2
Good afternoon. I have the following question. I must block the other radio Buttons by clicking on the radio button of the first check. Therefore, by clicking on the radio button prioritity1, the radio Buttons prioritity2 and prioritity3 should be disabled.
I tried it this way:
JS
<script type="text/javascript">
$(document).ready(function(){
if( $("input[type='radio'][id='prioridade1']").is(':checked')){
document.getElementById("prioridade2").disabled=false;
document.getElementById("prioridade3").disabled=false;
}
});
</script>
HTML:
<div class="row">
<div class="col-md-3 m-b-15">
<h5>Primeira checagem</h5>
<div class="form-check">
<input type="radio" class="form-check-input" id="prioridade1" value="cast(prioridade as int4) desc" name="checagem1">
<label class="form-check-label">Prioridade</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" id="tentativas1" value="ivr_contatos.tentativas" name="checagem1">
<label class="form-check-label">Tentativas</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" id="agendamento1" value="ivr_contatos.agendamento" name="checagem1">
<label class="form-check-label">Agendamento</label>
</div>
</div>
<div class="col-md-3 m-b-15">
<h5>Segunda checagem</h5>
<div class="form-check">
<input type="radio" class="form-check-input" id="prioridade2" value="cast(ivr_contatos.prioridade as int4) desc" name="checagem2">
<label class="form-check-label">Prioridade</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" id="tentativas2" value="ivr_contatos.tentativas" name="checagem2" >
<label class="form-check-label">Tentativas</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" id="agendamento2" value="ivr_contatos.agendamento" name="checagem2">
<label class="form-check-label">Agendamento</label>
</div>
</div>
<div class="col-md-3 m-b-15">
<h5>Terceira checagem</h5>
<div class="form-check">
<input type="radio" class="form-check-input" id="prioridade3" value="cast(prioridade as int4) desc" name="checagem3">
<label class="form-check-label">Prioridade</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" id="tentativas3" value="ivr_contatos.tentativas" name="checagem3">
<label class="form-check-label">Tentativas</label>
</div>
<div class="form-check">
<input type="radio" class="form-check-input" id="agendamento3" value="ivr_contatos.agendamento desc" name="checagem3">
<label class="form-check-label">Agendamento</label>
</div>
</div>
However I am not achieving the expected result. Is there any simpler way to perform this procedure?
If possible exemplify better.
– Valdeir Psr
edited the question friend
– Willian Lima
Why you do not capture the onchange event from Radio and disable them?
– Andre Mesquita
@Andremesquita I have no idea how to capture these events haha I will look about, it is possible to literally make the event click?
– Willian Lima
when clicking on the radio button prioritity1, the radio Buttons prioritity2 and prioritity3 should be disabled, and the other radio buttons?
– user60252
should be active, the idea is to block only those who have the same 'name', for example by clicking on tentative1 or tentative2 and tentatives3 should block, the same for scheduling.
– Willian Lima
Test my answer, qq thing me a feedback!
– user60252