I am trying to create form object based on the input on of the another select/textbox of the same box. For example if the user selects "Yes"/checks show him the textbox to input the value else do not show.
<form id="create_config_file" name="create_config_file" method="post">
<table width="87%" height="220" border="2" cellpadding="1" cellspacing="1" class="CSSTableGenerator">
<tbody>
<tr>
<td colspan="2">Server Details</td>
</tr>
<tr>
<td width="226">Name:</td>
<td width="783"><input name="server_name" type="text" id="server_name" size="40"></td>
</tr>
<tr>
<td>IP Address:</td>
<td><input name="ip_address" type="text" id="ip_address" size="40"></td>
</tr>
<tr>
<td>Port:</td>
<td><input name="port" type="text" id="port" size="10"></td>
</tr>
<tr>
<td>NAT:</td>
<td><select name="NAT" id="NAT">
<option value="Yes">Yes</option>
<option value="No" selected="selected">No</option>
</select></td>
Now I need to show input box to the user, if selects YES or else no input box is displayed. How can I achieve this. I am using PHP.
I googled but looks like my search query was not good enough.
Any help is appreciated.
THANKS