I'm continuing a "form" of a website, using JS HTML PHP

0

My question is: When clicking on a radio button, the other buttons that are in the simulator should disappear, if you press yes, if you press no, there is not any type of action, the button that I want give the action I have to call in php right? how?

<div class="layout_da_pagina" id="layout_da_pagina-container"></div>
<h3>a) Tem o Latout do seu site (Estrutura e número de página?)</h3>
<input type="radio" name="layout_da_pagina" value="sim"/>Sim<br/>
<input id="radio" type="layout_da_pagina" name="pesquisa" value="nao" />Não
    
asked by anonymous 27.02.2017 / 11:35

1 answer

0

I think I understand what you mean. Something like this here.

$(function() {

$('.sim1').click(function() {
$('.passo1').show();
$('.passo2').hide();
$('.passo3').hide();
});

$('.sim2').click(function() {
$('.passo2').show();
$('.passo3').hide();
$('.passo1').hide();
});

$('.sim3').click(function() {
$('.passo3').show();
$('.passo2').hide();
$('.passo1').hide();
});

$('.nao').click(function() {
$('.passo1').show();
$('.passo2').show();
$('.passo3').show();
});

});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><formaction="" method="post">
<div class="passo1">
<h3>a) Pergunta 1?)</h3>
<input type="radio" class="sim1" name="pesquisa1" value="sim"/>Sim<br/>
<input type="radio" class="nao" name="pesquisa1" value="nao" />Não
</div>

<div class="passo2">
<h3>b) Pergunta 2?)</h3>
<input type="radio" class="sim2" name="pesquisa2" value="sim"/>Sim<br/>
<input type="radio" class="nao" name="pesquisa2" value="nao" />Não
</div>

<div class="passo3">
<h3>c) Pergunta 3?)</h3>
<input type="radio" class="sim3" name="pesquisa3" value="sim"/>Sim<br/>
<input type="radio" class="nao" name="pesquisa3" value="nao" />Não
</div>
<input type="submit" name="submeter" value="Submit"><input type="reset" value="Redefinir" name="B2">

</form>
    
27.02.2017 / 21:07