ZF-2883: Elements in DisplayGroups do not adhere to array notation of parent sub form
If you have a display group within a sub form, the elements contained by the display group do not get namespaced within the rendered form correctly, which leads to issues during form submission.
$subForm = new Zend_Form_SubForm(); $subForm->setLegend('Attributes'); $subForm->addElement('text', 'foo') ->addElement('text', 'bar') ->addDisplayGroup(array('foo', 'bar'), 'foobar'); $form = new Zend_Form(); $form->addSubForm($subForm, 'attributes'); echo $form->render(new Zend_View());
One would expect the following HTML:
But the following is actually received: