ZF-3742: Elements in Display Groups are not updated with appropriate ElementBelongsTo setting


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:

    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');

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.


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.