I've got the following in my view:
echo $form->input('Category', array('multiple' => 'checkbox', 'disabled' => true));
But, the checkboxes aren开发者_运维技巧't disabled...
Try the checkbox() method in the form helper. API link: http://api.cakephp.org/class/form-helper#method-FormHelpercheckbox
Just change your syntax (I think it's just a wrapper around the FormHelper::input, but this should work):
echo $form->checkbox( 'Category', array( 'disabled' => true ) );
If that doesn't work, post the HTML that is output from your call.
I think you should pass true as string like:
echo $form->checkbox( 'Category', array( 'disabled' => 'true' ) );
If this doesn't work use
echo $form->checkbox( 'Category', array( 'disabled' => 'disabled' ) );
精彩评论