Forum Moderators: open

Message Too Old, No Replies

Tutorial for chained form options?

         

btvbill

3:03 am on Aug 21, 2011 (gmt 0)

10+ Year Member



Maybe "chained" isn't the correct term to use but I'm not even sure what to search on.
I'm not a whiz at JavaScript but I need to create a form that will allow a user to select from two radio buttons. If they select one of the options, two more form options (in the form of text areas) would appear for the user to enter their data.
I don't have a clue on how to create this beyond a standard form. If anyone knows of a tutorial or can help me out, I'd really appreciate it.

daveVk

5:03 am on Aug 21, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Start with a form containing all options, place optional bits within own div.

The trick is hide/show this div dependent on radio button state. Set [...].style.display = '' to show ('none' to hide ).