Is there any way to define which options in Zend_Form_Element_MultiSelect would be selected by default?
Asked
Active
Viewed 7,292 times
1 Answers
4
$element = new Zend_Form_Element_MultiCheckbox('foo', array(
'multiOptions' => array(
'foo' => 'Foo Option',
'bar' => 'Bar Option',
'baz' => 'Baz Option',
'bat' => 'Bat Option',
);
));
$element->setValue(array('bar', 'bat'));

Keyne Viana
- 6,194
- 2
- 24
- 55