Given two <select>
dropdown lists with same options and values, I want to disable the value selected in one dropdown, in the other dropdown.
This is my HTML code:
<span>Sender:</span>
<select required name="Sender">
<option selected disabled value="Select one">Select one</option>
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
<option value="4">D</option>
<option value="5">E</option>
</select>
<span>Receiver:</span>
<select required name="Receiver">
<option selected disabled value="Select one">Select one</option>
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
<option value="4">D</option>
<option value="5">E</option>
</select>
So when I e.g. select A (1) in Sender, it is disabled in Receiver, so that the user can't select the same person in that form (since it doesn't make sense).