See this example:

$checkBoxes =
$this->addElement('multiCheckbox','checkBoxes')->getElement('checkBoxes');
$checkBoxes->setMultiOptions(array('Y' => 'Yes','N' => 'No','M' => 'Maybe'))
                   ->setAttrib('disable', array('N','M'))
                   ->setDecorators(array(
                    array('ViewHelper', array('helper' =>
'formMultiCheckbox')),
                    ));

The same holds true for radio buttons and the select.


tim912 wrote:
> 
> Is there a way of disabling individual options in a set of radio buttons
> or checkboxes? I want to be able to show that the option could be
> available but is currently inactive or in use elsewhere. This is obviously
> different from disabling the whole radio or checkbox list element and I
> can't see a simple way of doing this from the library code.
> 
> Thanks for your help!
> 

-- 
View this message in context: 
http://www.nabble.com/Disabling-individual-options-in-Zend_Form_Radio-and-Zend_Form_MultiCheckbox-tp16467332p16482439.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to