I have a php form that gets the first input field results from a mysql database query. The query works fine and the results display in a dropdown box where the end user can select the correct answer from the list.
I want to make this selection choice a mandatory field in the php form how can I go about doing this?
I tried this format which I used for other fields but it didn’t appear to work:
<input type=“Date” name=“start” id=“date”; ?, required="" placeholder=“date”
oninvalid=“this.setCustomValidity(‘Please Enter valid date’)”
Any help would be appreciated.
After some further research I have found that the issue maybe due to the top result automatically being selected in the drop down list.