使用default属性来设置单选框(type = radio)的默认值:
echo $form->input('Deal.type', array(
'type' => 'radio','div' => array('class' => 'radio'),
'options' => array(
'0' => 0,
'3' => 3,
'10' => 10,
),
'default' => 0,
));
使用selected属性设置下拉列表(type = select)的默认值:
echo $form->input('Deal.branch_id', array( 'type' => 'select',
'multiple' => true,
'options' => array(1,2,3),
'selected' => '1',
));
iefreer