I create elements for subform:
for($i = 1; $i<10; $i++)
$name = new Zend_Form_Element_Text("[$i][name]");
But [ and ] will be deleted after dispatch page.
So how to setup name like list[id][name]?
I create elements for subform:
for($i = 1; $i<10; $i++)
$name = new Zend_Form_Element_Text("[$i][name]");
But [ and ] will be deleted after dispatch page.
So how to setup name like list[id][name]?
Create another Zend_Form_SubForm for each $i:
Text elements will be named "1[name]", "2[name]", and so on. If you want them to be named "list[1][name]" then you need another level of subform: