Ex: There is a radio group that has two options, one is "Business" one is "Individual"
If someone clicks on Business, a text field for DBA needs to appear, If Individual is selected, DBA needs to be hidden.
Solution:
You need to set a onclick for each input radio to show or hide the additional input text.
Like:
input type="radio" name="type" value="Business" onclick="document.getElementById('dba').style.display='block';"
input type="radio" name="type" value="Individual" onclick="document.getElementById('dba').style.display='none';"
input type="text" name="dba" id="dba" value=""
No comments:
Post a Comment