I want to be able to have the Other field disabled until Other is selected in the drop down menu. Other is selected so it becomes enabled and they submit the data.
The data is checked by the user and if wrong they go back to amend the data they entered. If this is done and they selected Other I need the Other field to be enable. But I cannot do this. My code is below.
Can anyone help please?
Tuscan
<tr><td>
<select name="chest" onchange="this.form.ochest.disabled = (this.value !='Other')" />
<option value="Select">Select</option>
<option value="28" <?php if ( $formsent && ($_POST[chest] == "28")) echo "selected=\"selected\" " ?>>28</option>
<option value="29" <?php if ( $formsent && ($_POST[chest] == "29")) echo "selected=\"selected\" " ?>>29</option>
<option value="30" <?php if ( $formsent && ($_POST[chest] == "30")) echo "selected=\"selected\" " ?>>30</option>
<option value="31" <?php if ( $formsent && ($_POST[chest] == "31")) echo "selected=\"selected\" " ?>>31</option>
<option value="Other" <?php if ( $formsent && ($_POST[chest] == "Other")) echo "selected=\"selected\" " ?> >Other</option>
</select></td>
<td><label for="ochest"><strong>Other</strong>:</label></td>
<td><input type="text" class="textinput" name="ochest" disabled="disabled" value="<?php if ( $formsent ) echo $ochest; ?>" />
</td>
</tr>