Create a RadioTag Tag.
App::Html()->radioTag(Name, Data Array, [Selected], [HTML Options]);
Parameter |
Description |
---|---|
Name |
Name of the Input element |
Data Array |
List of element to create options group |
Selected |
Default selected value |
Options |
HTML Attributes |
See bellow example:
echo App::Html()
->radioTag(
"data[Player][choice]",
array("I"=>"In Door Game","O"=>"Out Door Game"),
"I",
array(
"id"=>"choice"
)
);
/*
Return value
<input name="data[Player][choice]" type="radio" id="choice" checked="checked" value="I" id="choice" />
<label for="choice">In Door Game</label>
<input name="data[Player][choice]" type="radio" id="choice_1" value="O" id="choice" />
<label for="choice_1">Out Door Game</label>
*/