i want to store single from data in two places i.e http://www.abc.com/post.php and http://www.xyz.com/post.php. how can i do this. please help.
Thanks
Your best bet is to use jQuery to post the form. On a button click, use jQuery.post to submit the form twice.
Erick
Related
I have a form in which people have to fill in a couple of input fields. The problem is: if someone puts in a wrong captcha-code or any other inputfield goes wrong, than they have to start over, filling the form once again. I know that it's possible to use cookies to save the input and reset it back, but I can't find any code for this problem? I have 7 input fields and 2 select fields....
I hope you can help me out.
Use Ajax for this, there are numerous code online for this.
Use Jquery.
See any of these links helps you
http://www.webdesignbeach.com/beachbar/ajax-fancy-captcha-jquery-plugin
http://demos.myjqueryplugins.com/qaptcha/
http://tympanus.net/codrops/2009/09/22/21-free-captcha-sources/
Starting from the solution provided by the Nick Caver I wish to save some inputs provided by the users into a db. The problem is that I don't know how to select the right input from the current dialog box, using jQuery.
Here is my working code.
I've solve it. I had to use :last selector. I think is a good solution.
What do you think? I'm new in jQuery
I have a form with a single text field.
On submit I would like to display another form.
I can use RESPONSE.redirect() and pass it in the query string but I would rather not.
I don't want to use a SESSION variable.
I would like to display a second form which can read this value from the request variable.
I have looked at collective.z3cform.wizard but it is not obvious how to do this.
Trying to call the view() from the button handler does not seem to have any effect.
I fall in the same lack of functionality.
For what I know, z3c.form does not support this kind of traversing.
You may remember that this functionality worked well with CMFFormController.
Actually to do this, cmfformcontroller used session machinery.
So, you don't want to use session but that's the way. At least I do so, and I'm happy.
In this way there's no need of a wrapping tool like z3c.form.wizard.
hth,
alessandro.
collective.singing has a non-session based wizard which uses hidden fields to store results of intermediate steps.
I have 2 multi-select Html.DropDownList controls with a button between them. When the user selects items from the first and presses the button they are copied to the second Html.DropDownList control via JQuery.
My problem is when the form is posted back I do not know how to obtain all the values in the second Html.DropDownList control.
This would be really easy with web forms but I have no idea how to do it with MVC2
thanks
--- Also I will need to validate the second Html.DropDownList to ensure it contains at least one item.
Okay, I can get it to work by selecting all the items in the list with JavaScript right before the post back. This feels like such a hack to me though. Surely there is a better way to do it then this. Does anyone know of a way that does not rely on JavaScript?
If relying on JavaScript is the standard way to do this sort of thing then can someone explain why this is okay... Or is this an example of the immaturity of the MVC model?
Thanks.
I want to know if there is a way to submit a form but at the same time keep the values selected and edited(without reset).
Thanks.
One is to use ajax.
Your question is very vague... You will likely need to use PHP (cookies) to store the entries / changes.
In ASP.Net MVC, you may set the page with the form to submit to inherit an instance of a class which properties are set automatically.
In order to keep the values after the submit, you just have to place the object model as the same object that you received as an argument in the action, like this return View("ViewName", object).
But anyway, your question could have been a little more specific. Hope that if you are using .Net, this may be useful.