| Subject: | CakePHP form validation before sending post to the requested controller function |
|---|---|
| From: | OldWest |
| Date: | Fri, 25 Feb 2011 16:36:17 -0800 PST |
|
My validation is working as it stands, but I want to display the validation error prior to the search controller. I understand this might not be possible within the CakePHP framework. I have a model plan.php. And in the plans_controller.php, I have a function called search(). My form calls search() as expected (because there is no search model): As it stands, when I submit my search, the errors are displayed and the url changes to .../search, so no results are displayed ("There are 0 results for that search criteria", but the correct validation errors are displayed below required form fields. I do not want the .../search url to be displayed. I want the form to "halt" and just display the validation errors w/out changing the url to the search function. I am calling the search form within an element because the search form displays on several different pages. To sum this up: The search form should validate w/out changing the url path to the controller action name of the search. Of course, the validation is done IN the search() and plan.php model, so I just don't know how to work around this and wondering if its even possible. --Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Lost in Testing: Fixtures / testAction, Ryan Schmidt |
|---|---|
| Next by Date: | Re: views = "1234..." numbers, gremlin |
| Previous by Thread: | Media plugin - usage questions, will.brooke |
| Next by Thread: | Re: CakePHP form validation before sending post to the requested controller function, Stephen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |