Wednesday, 11 September 2013

ZF2 form collections. Elements that added dynamically completely ignored

ZF2 form collections. Elements that added dynamically completely ignored

I use ZF2 form collections
I create collection:
'type' => 'Zend\Form\Element\Collection',
'name' => 'domains',
'options' => array(
'count' => 2,
'should_create_template' => true,
'allow_add' => true,
'target_element' => array(
'type' => 'loginzaFieldset'
)
)
It works fine when I fill in two copies of fieldset "loginzaFieldset". But
when I dynamically add another one copy and save the form, third fieldset
is ignored. (When I call $form->getData() it returns only first and second
fieldset in array)

No comments:

Post a Comment