4
I have a page and I show 4 options for each of the 4 alternatives. Each option has a value from 1 to 4.
I would like that each time the user selects a value, this value is deleted from the list of options of the other alternatives, forcing the user not to repeat the values for each alternative.
Code with alternatives and options in html:
<body>
<h1>Avalie de 1 a 4 sem repetir</h1>
<div id="p1">
<form id="form1" action="" method="get">
<label class="control-label" for="a1"> <strong> Organizado</strong></label>
<select name="a1">
<option id="a1" name="a1" value="4" /> 4<br />
<option id="a1" name="a1" value="3" /> 3<br />
<option id="a1" name="a1" value="2" /> 2<br />
<option id="a1" name="a1" value="1" /> 1<br />
</select>
<br /><br />
<label class="control-label" for="b1"> <strong> Criativo</strong></label>
<select name="b1">
<option id="b1" name="b1" value="4" /> 4<br />
<option id="b1" name="b1" value="3" /> 3<br />
<option id="b1" name="b1" value="2" /> 2<br />
<option id="b1" name="b1" value="1" /> 1<br />
</select>
<br /><br />
<label class="control-label" for="c1"> <strong> Independente</strong></label>
<select name="c1">
<option id="c1" name="c1" value="4" /> 4<br />
<option id="c1" name="c1" value="3" /> 3<br />
<option id="c1" name="c1" value="2" /> 2<br />
<option id="c1" name="c1" value="1" /> 1<br />
</select>
<br /><br />
<label class="control-label" for="d1"> <strong> Impulsivo</strong></label>
<select name="d1">
<option id="d1" name="d1" value="4" /> 4<br />
<option id="d1" name="d1" value="3" /> 3<br />
<option id="d1" name="d1" value="2" /> 2<br />
<option id="d1" name="d1" value="1" /> 1<br />
</select>
<br />
</form>
</div>
</body>
Hello Bruno. This is an interesting and complex problem. Take a look here: https://jsfiddle.net/hghv56ks/ How do you want it to happen after the 4 selects have been selected once, and wanting to change the values again?
– Sergio