I have the following Form
below.
If I pass checked=checked
it brings the last selected option.
But, for example, I want the first option to be pre-selected, any hint / suggestion?
<?php
echo "<label> Selecione o tipo de entrada</label>";
echo $this->Form->input('tipo', array(
'type' => 'radio',
'before' => '<div ' . $style . '>',
'separator' => '</div><div ' . $style . '>',
'options' => array(
'D' => $this->Html->image(
"botoes/dinheiro.png", array(
"alt" => "Dinheiro",
"title" => "Dinheiro",
"style" => "height: 32px")),
'P' => $this->Html->image(
"botoes/porcento.png", array(
"alt" => "Porcentagem",
"title" => "Porcentagem",
"style" => "width: 28px")),
'H' => $this->Html->image(
"botoes/hora.png", array(
"alt" => "Hora",
"title" => "Hora",
"style" => "height: 32px"))),
'id' => 'tipo',
'label' => 'Dinheiro/Porcento',
'style' => '',
'legend' => false,
'onclick' => "formular()",
'checked' => 'checked',
'required'));
?>
Not a duplicate of How bring the radio button checked with a Bank Result