Suppose there is a RADIO{form} button

  1. Radio: 1
  2. Radio: 2

When selecting the 1st item, any fields are added, while selecting another other fields.
With JS I'm not friends, who will tell?

  • 3
    teach js, or pay what they would do for you - johniek_comp
  • It seems to me that there are ready-made scripts or at least some approximate solution ... - Quiss

1 answer 1

 <p><input type='radio' name='radio' value='1' onclick="hideFields(true)" checked> 1)</p> <p><input type='radio' name='radio' value='2' onclick="hideFields(false)"> 2)</p> <div id='hidden_fields'> <p>Name: <input ></p> <p>Sex: <input ></p> </div> <script type='text/javascript'> document.getElementById('hidden_fields').style.display = 'none'; function hideFields(hide){ document.getElementById('hidden_fields').style.display = hide ? 'none' : 'block'; } </script> 
  • 3
    In the answer editor there is a button 101010 . She is lonely. Remember about it from time to time. - Nofate ♦