Reputation: 4103
I have a Zend_Form_Element_Multicheckbox and I want to put some of its elements in a readonly state, how do I do that?
$colId = new Zend_Form_Element_MultiCheckbox('colId');
$colId->setLabel('Col ID')
->setMultiOptions(array_flip(array('sadda', 'asss'));
Upvotes: 3
Views: 2124
Reputation: 79
It works; be sure to use "disable" and not "disabled" in your setAttrib.
Upvotes: 1
Reputation: 2627
I think the following should work:
$colId
->setMultiOptions(array_flip(array('sadda', 'asss'))) // three closing-brackets
->setAttrib('disable', array('sadda', 'asss'));
Upvotes: 6