How do configure Zend_Form to use array notation?

后端 未结 2 957
情话喂你
情话喂你 2021-01-03 07:34

I\'m having difficulty configuring Zend_Form. I have a Zend_Form sub-class. The form has some required information and some additional information. I want the additional inf

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-03 08:01

    Sorted it! The problem is a custom decorator that was being used.

    //In
    $subForm = new Form_SubForm(); //this can be a Zend_Form or Zend_Form_SubForm     
    $subForm->setIsArray(true);
    $this->addSubForm($subForm, 'subform');
    

    Elements will be rendered with a id of subform-elementname and a name of subform[elementname].

提交回复
热议问题