Welcome Guest, Not a member yet? Register   Sign In
form_radio() and form_dropdown() .. array data . how to ?
#1

[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


Messages In This Thread
form_radio() and form_dropdown() .. array data . how to ? - by El Forum - 09-16-2009, 12:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB