Saturday, February 26, 2011

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

kdubya,

I've already tried that several times. The error never displays because of the redirect.

I am trying to work it into a session, but no luck yet : (

else {
 //$errors = $this->Plan->invalidFields();
 //$this->Plan->validates();
 $errors = $this->Plan->invalidFields();
 debug($errors);
 //$this->Session->setFlash() = $this->Plan->invalidFields();
 $this->Session->setFlash("this works, but how do I get the errors array from my model and \$this->Plan->validates() in here???");
              $this->redirect('/');
}


--
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: