Details
-
Type:
Docs: Problem
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Zend_Form
-
Labels:None
-
Language:English
Description
The Code example below has the wrong class definition:
Multi-page forms code example
class My_Form_Registration extends Zend_Form { // ... /** * Is the sub form valid? * * @param Zend_Form_SubForm $subForm * @param array $data * @return bool */ public function subFormIsValid(Zend_Form_SubForm $subForm, array $data) { $name = $subForm->getName(); if ($subForm->isValid($data)) { $this->getSessionNamespace()->$name = $subForm->getValues(); return true; } return false; } /** * Is the full form valid? * * @return bool */ public function formIsValid() { $data = array(); foreach ($this->getSessionNamespace() as $key => $info) { $data[$key] = $info; } return $this->getForm()->isValid($data); } }
Instead, it should show:
Multi-page forms code example - correct
class RegistrationController extends Zend_Controller_Action { // class contents...
Corrected in trunk; thanks for the report.