cakephp-plugin-boost_cake
cakephp-plugin-boost_cake copied to clipboard
How do I set a default radio button checked with boostcake?
I want to set "Medium" as the default radio button
echo $this->Form->input('priority', array(
'type' => 'radio',
'before' => '<label class="col col-md-3 control-label">Priority</label>',
'legend' => false,
'class' => 'radio-btn',
'options' => array(
1 => 'High',
2 => 'Medium',
3 => 'Low'
)
));
You can try:
echo $this->Form->input('priority', array(
'type' => 'radio',
'before' => '<label class="col col-md-3 control-label">Priority</label>',
'legend' => false,
'class' => 'radio-btn',
'options' => array(
1 => 'High',
2 => 'Medium',
3 => 'Low'
)
'value' => 'Medium'
));
Thank you, it works :)