Expand my Community achievements bar.

Need help with a questionaire form with multiple checkboxes

Avatar

Level 2

Happy Holidays,

I have a questionaire form that I've developed for work where there are 16 questions in total and on the results page it states that my "yes" responses from my yes/no checkboxes are valued as a score of 1 and no answers are scored as a 0 in a text field provided for each question.

for example:

1) did santa come to your house this year?  yes/no  if yes score is 1    if no score is 0

However, there is a question on the form that has multiple answers in the form of just a single checkbox answer.

for example

5) when santa came to your house did you receive any of the following:

     a) car

     b) robot

     c) doll

     d) radio

     e) video game

     f) choo choo train

on the results page it states that any of the choices on question 5 are valued as a total score of 1.  There is no adding of the multiple options you have, so any option you choose, the result will be 1.  If they didn't select any of the checkboxes the answer would be 0 (zero).

I tried the following javascript for the *on change event for each checkbox.

==========================================================

if (this.rawValue == "0") {

  this.resolveNode("Page4.q5").rawValue = "0";

}

else

if (this.rawValue == "1") {

  this.resolveNode("Page4.q5").rawValue = "1";

}

==========================================================

Which works on the results page, but if I uncheck any of the checkboxes it leaves the value of 0 on the results page even though I may have 3 of the 6 options checked off.  I don't think I used the proper code for these 6 options and trying to figure out if any of the options are selected, score is 1, if none are selected it's automatically scored as 0 on the results page.

I hope I explained it in the easiest way possible.  Any help will be greatly appreciated.

I've attached a sample of the form

https://workspaces.acrobat.com/?d=lOsKDDK1ZPJd5JFpiTfF6A

0 Replies