Feb 5th, 2015, 8:37 AM
Hi, I have an external form using API with server-side PHP validation. I have with a dropdown field with 4 choices. Submissions work fine, but if I go back to the form, the previous selected choice remains in the drop down field and is persistant. Also when this happens the submission ID stays the same upon another submission. I have checked and re-checked the code and all seems to correct. Here is my code for the dropdown:
Thanks in advance for any help with this problem, Gene
Code:
<select name="Charter_Type" tabindex="5" class="selmenu">
<option value="">Please select</option>
<option value="8-Hours" <?php if (@$fields["Charter_Type"] == "8-Hours") echo "selected"; ?>>8-Hours</option>
<option value="6-Hours" <?php if (@$fields["Charter_Type"] == "6-Hours") echo "selected"; ?>>6-Hours</option>
<option value="4-Hours" <?php if (@$fields["Charter_Type"] == "4-Hours") echo "selected"; ?>>4-Hours</option>
<option value="General-Inquiry" <?php if (@$fields["Charter_Type"] == "General-Inquiry") echo "selected"; ?>>General-Inquiry</option>
</select>