[eluser]Nano HE[/eluser]
Hi,
Good day.
I am newbie. i got two quesions about form_radio() and form_dropdown()
Q1, How to rewrite the following snatch code with form_radio.
Code:
echo "<p><label for='gender'>Gender</label><br/>";
$options = array('male' => 'male', 'female' => 'female');
echo form_dropdown('gender',$options) ."</p>";
Q2, How to get 2nd form_dropdown $options categoried based on the 1st form_radio selected.
that means.
1st. if i selected (form_radio) item "Male"
2nd. i could select the (form_dropdown) list items which only related with Male. (Male 20-29, Male30-39, etc.)
3rd. and the other Female related items will hide, not show on the dropdown list.
4th. conversely when i selected (form_radio) item "Female". Only show (Female20-29, etc.)
=====================================
Comment: Q1 soluted. thanks