Requires an array of flags using Zend_Form_Element_Checkbox

I need a check-box array that should look like this:

<input type="checkbox" name="myname[]" > 

I am currently using

 new Zend_Form_Element_Checkbox('myname[]'); 

but it does not display the array in the html control. He draws it like

 <input type="checkbox" name="myname"> 

AnySolution?

+4
source share
1 answer
 <?php $myname = new Zend_Form_Element_Checkbox('myname'); $myname->setLabel('This is my label') ->setRequired(true) ->addMultiOptions(array('myname' => true)); 
+2
source

All Articles