Form validation and redirects |
[eluser]ToddyBoy[/eluser]
I have a problem with form validation and how to take the user to where I want them to go with appropriate messages included. I've used something like this Code: function send_request() The thing I would like to know is if I can change the loading of a view to a redirect (to the same page) if the validation fails. Here is what I mean. Say my original URL is www.mysite.com/page/another-page. This location has a form in it which submits to /page/send_request. If the form validation fails, the load view shows the original page under the URL of /page/send_request. I don't want the user to see that /page/send_request location. I would like to try something like Code: function send_request() I realise that a redirect clears form post data. Is there a way to somehow keep the form data and still use a redirect? I'm thinking that a session might be the answer but I would rather avoid creating and destroying sessions. |
Messages In This Thread |
Form validation and redirects - by El Forum - 10-30-2010, 12:54 PM
Form validation and redirects - by El Forum - 11-01-2010, 10:32 AM
Form validation and redirects - by El Forum - 11-01-2010, 10:50 AM
|