Issue Type: Bug Created: 2011-10-28T15:56:23.000+0000 Last Updated: 2011-10-28T17:40:19.000+0000 Status: Open Fix version(s): Reporter: Joni Järvinen (email@example.com) Assignee: Christian Albrecht (alab) Tags: - Zend_Form
Related issues: Attachments:
I came across an annoying bug in Zend Framework and have been trying to find an answer through several forums.
The problem is that when I have a form and add a subform in it and add subform into that form and then add an element into the last subform which belongs to an array; Zend_Form loses one array from the middle.
<pre class="highlight"> $form = new Zend_Form(); $subForm1 = new Zend_Form_SubForm(); $subForm2 = new Zend_Form_SubForm(); $element = new \Zend_Form_Element_Text('textElement'); $element->setBelongsTo('textThingsInArray'); $subForm2->addElement($element); $subForm1->addSubForm($subForm2, 'subForm2'); $form->addSubForm($subForm1, 'subForm1'); echo $form->render(); <pre class="highlight"> <pre class="highlight">
If this is intentional it's totally wrong in my opinion; If elements in the subform belong to an array it doesn't mean that an element could not belong to some array itself and the elements array would then belong to the subforms belongsto array.
Posted by Frank Brückner (frosch) on 2011-10-28T17:40:19.000+0000
Code tags added.
Have you found an issue?
See the Overview section for more details.