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

Asked

Viewed 93 times

0

My question is: When clicking on a radio button, the other "Buttons"/ other questions that are in the simulator should disappear, if press yes, if you press no there is no action, the button I want to give the action I have to call in php right? as?

<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
  • 1

    facilitates our response, puts the code with the radio button and the button

  • I’m a little uneducated on the subject, but yes, help me thank me: <div class="layout_da_pagina" id="layout_da_pagina-container"></div> <H3>a) Do you have Latout on your site (Structure and page number? )</H3> <input type="radio" name="layout_da_pagina" value="yes"/>Yes<br/> <input id="radio" type="layout_da_pagina" name="search" value="no" />No

  • Elaborate on your question (edit the question instead of supplementing the comments). http://meta.pt.stackoverflow.com/questions/1186/como-crea-um-exemplo-m%C3%Adnimo-completo-e-verific%C3%A1vel? Rq=1

  • In the same way when clicking the button the action happens.

  • I have several questions with radio Buttons, ex: "question"--radio button yes or no, so successively, like q when pressing yes, hide all other questions and radio Buttons.. I don’t know if you understand what I mean..

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>
<form action="" 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>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.