Hello
Inside the executeXYZ() function of an actions.class.php I check a condition
that can not be put into validators. If that condition fails I still want
to have a red error message on top of the formular. How is this possible?
I.e.:
public function executeXYZ(sfWebRequest $request) {
$this->form = new MyForm();
$this->form->bind($request->getParameter($this->form->getName()));
// check for something
if ( ! reallyValid()) {
$this->form->insertGlobalError("That something failed.");
$this->setTemplate('edit');
return;
}
... normal stuff with isValid() and $this->form->save() ...
}
bye,
-christian-
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=.