2009年2月19日星期四

Re: [fw-mvc] Subform added with Ajax

You should ensure that your form is rebuild the same way in the submit action as the different ajax action build it.
In your example, you should readd the subform to the form. It's not persist and automatic.
 
2009/2/7 angelbit <angelbit88@gmail.com>

Hi to all

This is the method called from ajax

 public function addcampioneAction(){


           $form=$this->getForm();
           $n_campioni=$this->_request->getParam('n_campioni', 0);

           $subclass=new CampioneFinitureSpeciali;
        $form->addSubForm(new Campione,$n_campioni);

    $this->view->form=$form->getSubForm($n_campioni);

       }

the method work corretly but when submit the form d'ont find the subform...
for test have used this code :

print_r($form->getSubForms());

and result is :
Array ( )

What is the problem?
Thanks
--
View this message in context: http://www.nabble.com/Subform-added-with-Ajax-tp21890400p21890400.html
Sent from the Zend MVC mailing list archive at Nabble.com.


没有评论: