ZF-3742: Elements in Display Groups are not updated with appropriate ElementBelongsTo setting
Description
When elements belong to a DisplayGroup and the form has specified an elementsBelongTo setting, the setting is not being used to determine the element name and id correctly. For instance:
$form->addElements(array(
new Zend_Form_Element_Text('foo'),
new Zend_Form_Element_Text('bar'),
new Zend_Form_Element_Text('baz'),
new Zend_Form_Element_Text('bat'),
));
$form->addDisplayGroup(array('bar', 'baz'), 'barbaz');
$form->setElementsBelongTo('myform');
When the form is rendered, all elements should have a name of 'myform[]' and an id of 'myform-'. However, the elements inside the display group do not.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-07-25T07:36:42.000+0000
Added test to verify that this was fixed with changes added for a previous issue. Test merged to 1.5 and 1.6 release branches.