Reputation: 9829
I use this piece of code to disable options of a select box in Zend Framework:
$this->getElement('selectbox')->setAttrib('disable', $disabled_options);
But I don't know how to re-enable them or clear these attributes by php code. Could you please tell me how can I achieve this goal?
Is there any method like setAttrib('enable', $options);
?
Upvotes: 1
Views: 383
Reputation: 1967
Maybe it is better to just remove unnecessary options: https://stackoverflow.com/a/878331/1333512
Demo
Upvotes: 0
Reputation: 8830
I assume you are using 'disabled' attribute...
then to remove it use unset($this->getElement('selectbox')->disabled);
Upvotes: 1