Posts tagged zend_form
Set attribute on select option with Zend_Form
413 years ago
Today I needed to disable a few options in a status select box when building a Zend Framework application. Luckily this is very easy to do, but you just have to know how.
Make sure you set all available options first:
$element->setMultiOptions($options);
Below that line you can set an attribute on some options. For example, if you want to disable the first, second, and fith option in the select box:
And you’re done!