0
I have 2 select options. If the option of select1 AND the option of Select2 is selected, nothing appears. Otherwise a form appears.
HTML
<div class="form-group" style="color:black">
<select id="test1" name="test1">
<option value=""> Seleciona</option>
<option value="Sim"> Sim </option>
<option value="Não"> Não </option>
</select>
</div>
<div class="form-group" style="color:black">
<label> Com Consequentimento? </label >
<select id="conse" name="consente_vq" >
<option value=""> Selecione </option>
<option value="Sim"> Sim </option>
<option value="Não"> Não </option>
</select>
</div>
<div id="form2">
<form> //aqui teria perguntas </form>
</div>
I wish that when "Test1" == 'No' && "test2" ='No' "form2" does NOT appear, otherwise it already appears.
I only managed with a select. Something like this:
Javascript
<script> $("#test1").change(function(){
if($(this).val() == 'Não'){
$("#form2").hide();
}else{
$("#form2").show();
}
});
</script>
But when I try to do it with the 2 select I can’t anymore
Important you [Dit] your question and explain objectively and punctually the difficulty found, accompanied by a [mcve] of the problem and attempt to solve. To better enjoy the site, understand and avoid closures and negativities worth reading the Stack Overflow Survival Guide in English.
– Bacco