开发者

Get selected options of selectbox with multiple selection in Zend Framework

开发者 https://www.devze.com 2023-01-31 06:35 出处:网络
$this->getRequest()->getParam(\'my_select_box\'); This is what I use to get input values in controller in Zend Framework. When multiple selection开发者_运维问答 is enabled with selectbox, this
$this->getRequest()->getParam('my_select_box');

This is what I use to get input values in controller in Zend Framework. When multiple selection开发者_运维问答 is enabled with selectbox, this only brings one 'option.' How will I get an array of all selections user made?

I do not use Zend_Form, is there any way to achieve this?


You will need to name your element "my_select_box[]" and retrieve it as you do above.

0

精彩评论

暂无评论...
验证码 换一张
取 消