I am facing problem in edit mode.
The radio button is not showing as selected.
This is my code
<div class="control-group required"><label class="control-label"><?php echo __('status') ?></label><div class="controls">
<?php
$attributes = array(
'selected' => 1
);
echo $this->Form->radio(
'status', $statusData,$attributes
);
?>
<span id="error" class="error"></span>
</div>
</div>
try this please:
$attributes = array(
'value' => '1'
);
$statusData = array(
'1' => 'Yes', '0' => 'No'
);
echo $this->Form->radio(
'status', $statusData,$attributes
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With