Tutorial :Zend Framework Forms - How to I make a control an array



Question:

Using Zend form how would I make a control (element) an array?

An example use case:

I have a list of items and I want each item to have it's own checkbox on a form, but those checkboxes should post as an array. This means that each checkbox name is 'item[]'. How can I achive this using Zend Form? I have tried setting the isArray property on the checkboxes to true but giving them the same name, but this doesnt seem to work.


Solution:1

http://framework.zend.com/manual/en/zend.form.standardElements.html#zend.form.standardElements.multiCheckbox


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »