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
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]
.
To expand on the answer because $form->setIsArray(TRUE) was not working with my custom decorator for elements. My custom ViewScript decorator was needed for rendering the Zend_Form_Element.
The problem, it was rendering the element name with $this->element->getName(). I had to use $this->element->getFullyQualifiedName() in the ViewScript decorator script.