How to make select not allow that the option "Lider" is not duplicate , because in my business rule only one user can be a leader .
I thought of the following:
Assuming I have 3 selects. If I select one of them as LEADER , and select another select also as LEADER , javascript deselected the leader option of the first select and leave selected only the second select Leader option.
Here is a simulation of the problem:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.3/js/bootstrap-select.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.js"></script><linkhref="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.3/css/bootstrap-select.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.css" rel="stylesheet" />
<select class="selectpicker" multiple>
<option value="1">Líder</option>
<option value="10">Para Conhecimentor</option>
<option value="11">Participante</option>
</select>
<br><br>
<select class="selectpicker" multiple>
<option value="1">Líder</option>
<option value="10">Para Conhecimentor</option>
<option value="11">Participante</option>
</select>
<br><br>
<select class="selectpicker" multiple>
<option value="1">Líder</option>
<option value="10">Para Conhecimentor</option>
<option value="11">Participante</option>
</select>
<br><br>
<select class="selectpicker" multiple>
<option value="1">Líder</option>
<option value="10">Para Conhecimentor</option>
<option value="11">Participante</option>
</select>