PDA

View Full Version : Contact form with dependent drop-down menus



berdot
29 Apr 2008, 12:42 PM
I need to build a contact form that has a drop-down that is dependent on the selection of another drop-down.
The code I have now (without any drop downs) is:

<form action="" method="post" name="theform" id="theform">
<table width="410" border="0" cellpadding="2">
<tr>
<td><div align="right">Name : </div></td>
<td><input type="Name" />
</td>
</tr>
<tr>
<td><div align="right">Company : </div></td>
<td><input type="Company" />
</td>
</tr>
<tr>
<td><div align="right">Cargo : </div></td>
<td><input type="Cargo" />
</td>
</tr>
<tr>
<td><div align="right">Phone </div></td>
<td><input type="Phone" />
</td>
</tr>
<tr>
<td><div align="right">Email </div></td>
<td><input type="Email" />
</td>
</tr>
<tr>
<td><div align="right">Your Comments : </div></td>
<td><textarea rows="4" name="Comments" cols="50" wrap="virtual"> </textarea></td>
</tr>
</table>
</form>


thanks!

kb0000
30 Apr 2008, 08:03 AM
I need to build a contact form that has a drop-down that is dependent on the selection of another drop-down.
The code I have now (without any drop downs) is:

<form action="" method="post" name="theform" id="theform">
<table width="410" border="0" cellpadding="2">
<tr>
<td><div align="right">Name : </div></td>
<td><input type="Name" />
</td>
</tr>
<tr>
<td><div align="right">Company : </div></td>
<td><input type="Company" />
</td>
</tr>
<tr>
<td><div align="right">Cargo : </div></td>
<td><input type="Cargo" />
</td>
</tr>
<tr>
<td><div align="right">Phone </div></td>
<td><input type="Phone" />
</td>
</tr>
<tr>
<td><div align="right">Email </div></td>
<td><input type="Email" />
</td>
</tr>
<tr>
<td><div align="right">Your Comments : </div></td>
<td><textarea rows="4" name="Comments" cols="50" wrap="virtual"> </textarea></td>
</tr>
</table>
</form>


thanks!

You can try either AJAX or Javascript to dynamically display the drop down.
Search for AJAX and Javascripts, these can do the job easily.