I am rendering checkbox list; say 10 checkboxes using the following code:
<?php echo $this->Form->input('User.hobbies', array('options' => $hobbies_array, 'multiple' => 'checkbox'));?>
Now I want to disable some of those checkboxes before rendering the view. Means I do not want to use the javascript to disable some checkbox. Please suggest, is there any kind of option there by which we can provide the array of checkbox values to disable some of those checkboxes. Please suggest.
There is no any kind of
FormHelpermethod available yet which can take two arrays, one for checkboxlist and another one for disabling some of those checkboxes. You will have to make your own Helper class extended by theFormHelperclass.