Page 1 of 1

Dynamic forms

Posted: Wed Oct 08, 2008 9:33 am
by wescrock
Hello all,

I was hoping that maybe someone could show me an example of how to make a form change based on a selected option in a select statement.

here is my select statement:
<select name="fair_name">
<?php
while ($row = mysql_fetch_assoc($result_fair_name)){
$id_fair_ = $row['id_fair_'];
$fair_name = $row['fair_name'];
print "<option value=$id_fair_>$fair_name\n";
}?>
</select>
When the option 'General Worlds Fair' is selected... I need a second select statement to appear... If else, i need an input for year and place help to appear.

If anyone could help, that would be phenomenal!

thank you,
Wes

Re: Dynamic forms

Posted: Wed Oct 08, 2008 9:44 am
by aceconcepts
If you dont want to actualy have to post any data for this to happen then you will have to use JavaScript - i think they call it a chain select: http://www.google.co.uk/search?hl=en&q= ... arch&meta=