I have been working in this for a while. When I build a web form there
is typically numerous times when you ask a question like:

Have you had any speeding tickets in the last three years? Yes No
If yes, please give the details here.

This kind of question pattern (ask a question, if answer is yes then
ask for details) usually occurs many times on the typical web form. I
want to hide the detail question unless the first question is answered
"yes". Easy with jQuery.

I have two questions:

One...When the form loads or is reloaded I want to go through and look
at the state of the first question (every time a first question
appears on the form) and either hide or show the detail question
(depending upon Yes/No state) with a single function rather than a
dedicated custom function for each question/detail set.

Second...I want a single flexible function that will see that "Yes"
was clicked and find the corresponding detail section for that yes
question and hide/show the detail question.

Can some of you jQuery experts steer me (jQuery beginner) in the right
direction here. It seems like this is the kind of  thing that has
probably been solved many, many times before.

Thanks in advance.

Reply via email to