I have a Zend_Form with multiple Multicheckbox element, the thing that I want is to give them all the same name: categories[].
When I add multiple elements like this:
$this->createElement('multiCheckbox', 'categories[]')
->setLabel('Category 1')
->addMultiOption(1, 'Subcat1')
$this->createElement('multiCheckbox', 'categories[]')
->setLabel('Category 2')
->addMultiOption(2, 'Subcat2')
etc...
Only the Category 2 checkboxes are displayed.
Seems that Zend has the element name as leading. Currently I workaround this with different element names but this isn’t really workable at all.
How can I solve this?
Ended splitting them up in separate groups.