By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,002 Members | 2,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,002 IT Pros & Developers. It's quick & easy.

Activate/Deactivate parts of a form

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.