I was searching all over but failed to find a way to add selected=selected
into multiselect.
My code is like this:
[code]
        $listOptions=(array(
'first'    => 'first choice',
'second' => 'second choice',
'third' => 'third choice'
);

        $lists = new Zend_Form_SubForm();
        $lists->addElements(array(
        new Zend_Form_Element_Multiselect('nameOfMultiselect',array(
        'label'         => 'Select all you can apply',
        'required'              =>true,
        'filters'               =>array('StringTrim'),
        'multiOptions'  => $listOptions,
        
        'validators'    => array(
                    array('InArray', false, array(array_keys($listOptions)))
                )
        ))
        ));
[/code]

I would like to have selected second choice when multiselect display.
How this can be done?
Thanks,
Vladimir
-- 
View this message in context: 
http://www.nabble.com/How-to-add-select%3Dselected-in-Zend_Form_Element_Multiselect-tp19166233p19166233.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to