Display subform after validate main form

Posted by bahamut100 on Stack Overflow See other posts from Stack Overflow or by bahamut100
Published on 2010-03-30T16:19:57Z Indexed on 2010/03/30 16:23 UTC
Read the original article Hit count: 528

Filed under:
|
|
|

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);
        }
    }

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework