<?php
if ($checkbox == 1) {
$checked = 'checked';
} {
$checked = '';
}
echo $this->Form->input('Off Line Quotes', array(
'type' => 'checkbox',
'checked' => $checked,
'class' => 'inline',
'id' => 'editcheckbox_quotes',
'format' => array(
'before',
'input',
'between',
'label',
'after',
'error'
)
));
?>
答案 0 :(得分:3)
尝试将其他内容放在{$ checked =''}
前面