2010-06-09 55 views

回答

0

嘗試該複選框()方法在幫助者的形式。 API鏈接:http://api.cakephp.org/class/form-helper#method-FormHelpercheckbox

只要改變你的語法(我認爲這只是圍繞表單助手::輸入的包裝,但這應該工作):

echo $form->checkbox('Category', array('disabled' => true)); 

如果不工作,發佈的HTML從您的電話輸出。

+0

已經嘗試過,這是行不通的。在cakephp.lighthouseapp.com上張貼一張票。看到這裏:http://cakephp.lighthouseapp.com/projects/42648/tickets/808-form-input-cant-disable-multiple-checkboxes – Temega 2010-06-30 12:03:50

0

我想你應該像字符串傳遞正確的:

echo $form->checkbox('Category', array('disabled' => 'true')); 

如果這不起作用使用

echo $form->checkbox('Category', array('disabled' => 'disabled'));