Display subform after validate main form
- by bahamut100
Hi,
I want to display a new form after the validation of a form.
I use Zend_Form_SubForm to do it (I Try to Zend_Form too), but this new form is not displaying.
Why ??
This is the code in question :
if ($this->_request->isPost()) {
$formData = $this->_request->getPost();
if ($form->isValid($formData)) {
$subForm = new Zend_Form_SubForm();
$subForm ->setAction('')
->setMethod('post');
$nom=new Zend_Form_Element_Text('nom');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('OK');
$subForm->addElements(array($nom,$submit));
} else {
$form->populate($formData);
}
}