I want know how to add custom attribute for option in a select field of Zend form.
PHP:
$option_values = array(\"multiOptions\" => array(
\"US
mingos, you forgot about setvalue method of multiselect.
you shoul add something like:
...
foreach ($options as $opt_value => $option) {
$opt_disable = '';
$opt_selected = '';
if (is_array($disable) && in_array($opt_value, $disable)) {
$opt_disable = ' disabled="disabled"';
}
if (in_array($opt_value,$value)) {
$opt_selected = ' selected="selected"';
}
$list[] = $this->_build($option, $disabled, $opt_selected);
}
...
and
protected function _build($option, $disabled, $opt_selected) {
$html = '";
}