Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法定义 Zend_Form_Element_MultiSelect 中的哪些选项默认被选中?
$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'));
http://framework.zend.com/manual/en/zend.form.standardElements.html#zend.form.standardElements.multiCheckbox