Hi all,
I have a php based form that is pretty simple. It has a select list with some dynamic options and a few other fields. I want to be able to have certain fields initially hidden, then show when a couple different options are selected from the dynamic list.
For example, the list may include
Option 1
Option 2
Option 3
Option 4
And if 2 or 4 are selected, these other form fields should show up. Is there any way to do this with javascript? Below is a snip of the simple form.
[code]
//Our dynamic select list.
echo “<select name=”options”>”;
for ($e=0; $e<$Option_Count; $e++) {
$option_id = $Options->option_id[$e];
$option_name = $Options->option_name[$e];
echo “<option name=’options’ value=’$option_id’>$option_name</option>”;
}
echo “</select>”;
//These should be hidden and only show when certain options are selected
echo “Item 1:<input type=”checkbox” name=”item1″>”;
echo “Item 2:<input type=”checkbox” name=”item2″>”;