468,241 Members | 1,718 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,241 developers. It's quick & easy.

Activate/Deactivate parts of a form

Hello!

I need some advice with some forms.

We have to create a survey for our users in our company.

Now I created a html-document with one form.
I used radio-buttons to collect the answers from the users.

There is now one main-question on top of the survey.
If the users chooses "NO" as the answer, all following parts of the form
should be deactivated.
Only if "YES" was choosen, the rest of the form should be useable.

Is there a usefull way to solve this problem?

Thanks in advance!

Axel

--

<<Spreading The News Around The World>>
by M.L. Gore - Depeche Mode
Jul 20 '05 #1
1 6086
Axel Schwenke wrote:
Hello!

I need some advice with some forms.

We have to create a survey for our users in our company.

Now I created a html-document with one form.
I used radio-buttons to collect the answers from the users.

There is now one main-question on top of the survey.
If the users chooses "NO" as the answer, all following parts of the form
should be deactivated.
Only if "YES" was choosen, the rest of the form should be useable.

Is there a usefull way to solve this problem?


Option 1:
Instruct users to continue with a later question and provide a link, like
this:
If you answered "No", please <a href="#q10">continue with question 10</a>.

On the server side, ignore the answers which should not be filled out (in
case someone ignores your instructions and still answers the other
questions).
Option 2:
Use a scripting language to jump to the next applicable question (hint:
check the focus method in Javascript). If you KNOW that all of your users
have modern browsers with good CSS support and Javascript enabled, you could
also change the visibility of sections on the page.

Again, on the server side, ignore the answers which should not be filled out
(in case someone has Javascript turned off, or first answers the jump
question in one way, then changes his/her mind and answers it differently)
Option 3:
Split the survey into individual questions, each on a single page, so you
only show applicable questions.
--
Klaus Johannes Rusch
Kl********@atmedia.net
http://www.atmedia.net/KlausRusch/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Jonas | last post: by
2 posts views Thread by Dave Booker | last post: by
5 posts views Thread by Andrew Morton | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.