I am having trouble understanding the Radio button HTML Helper.
Specifically, I cannot find any information anywhere about how to
check/select one specific radio button from a group of radio buttons.
For example, I have the following code:
<?=$html->radio('Company/location', array('Foreign' => 'Foreign',
'Local' => 'Local'), null, array('checked' => 'checked'))?>
This line causes the both radio buttons to be checked. What I am
trying to do is get the system to check the Foreign radio button, but I
cannot seem to figure out a way to do this.
I've tried fiddling around with the parameters as follows:
<?=$html->radio('Company/location', array('Foreign' => 'Foreign',
'Local' => 'Local'), null, array('checked' => null, 'checked' =>
'checked'))?>
<?=$html->radio('Company/location', array('Foreign' => 'Foreign',
'Local' => 'Local'), null, array('checked' => 'false', 'checked' =>
'checked'))?>
But none of these seem to work. I just can't wrap my head around the
conceptual model used for the radio button helper. How do I need to
setup the array in order to tell CakePHP to check the Foreign radio
button, and leave the Local radio button unchecked? Can someone please
help?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---