0
I am using the code below to filter values between two combos. The value of the first does not appear in the second:
$("#treinamento").on('change', function() {
$("#validade_treinamento").prop('required',true)
$("#treinamento_2").removeAttr('disabled');
$('#treinamento_2 option')
.hide() // esconde
.filter('[value!="'+$(this).val()+'"]') // filtro das opções diferentes (!)
.show(); // exibe
});
But what happens now is this: There are no more two combos, but five. And the values cannot appear in the combos below. In the example below, combo 2 does not show the value of combo 1, but combo 3:
Using this logic of the code I already have, there is how to control the 5 combos so that the values already selected in them do not appear?