Saturday, February 26, 2011

Re: CakePHP form validation before sending post to the requested controller function

Use custom routing to change /plans/search to /search

If that is the reason?

On 26 February 2011 11:15, Stephen <stephen@ninjacodermonkey.co.uk> wrote:
Why do you have a search controller?

Have a search action in the PlansController, as I assume you are searching for plans.

You don't need to call the form from the search action, you can call it from anywhere and it will validate - if it doesn't validate, redirect to the referer?

a Plan is an Object, a Model. A Search isn't an object so it shouldn't have its own controller, that's my opinion.

--
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk





--
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk


--
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@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: