Javascript dependant Radio Form | Sololearn: Learn to code for FREE!


Javascript dependant Radio Form

Hey guys I have 2 forms on a page... So I want to display each form according to user radio button selected... I have Corporate Form and Individual Form. If the user Select Corporate all the fields under Corporate form will appear if the user Select Individual all the fields under individual form will appear while it will hide corporate form... Please help guys

7/30/2018 11:33:18 PM

Jimoh Wareez Oluwaseun

1 Answer

New Answer


Check and study this code: Radio buttons are hidden but are used to control the sub-parts of a unique form (while you seems to want multiple forms instead, but the logic is similar ^^ You could also check these ones, always using the same css tricks to avoid js for handling sections show/hide: (last one provide an embeded precise explanation/tutorial)