views:

167

answers:

1

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'));
+2  A: 

I think the following should work:

$colId ->setMultiOptions(array_flip(array('sadda', 'asss')) ->setAttrib('disable', array('sadda', 'asss'));

Kieran Hall
It did work, thanks a lot!
LuRsT