i am using zendframe work for my site, I am using the below mentioned code for a multiselect dropdown box.
$newscat = new Default_Models_Common();
$row_newscat = $newscat->fillSelect_new("casestudiesservice","serviceId","serviceName", "serviceStatus='1' ORDER BY serviceName ASC");
$casestudiesServices = new Zend_Form_Element_Multiselect('casestudiesServices[]',array(
'class' => 'text',
'value' => $view->row->casestudiesServices,
'required' => true));
It working fine but i am unable to validate that box.It return empty array
(Array (
[0] => Array
(
) ))..
Please try following method. Maybe it will useful to you.
Use multi select element like below:
You can get the values of element like this:
Here , $users will contain an array of the values that have been selected:
Good luck.