Skip to main content
Bec W.
Known Participant
October 22, 2021
Answered

Check Boxes with Calculations

  • October 22, 2021
  • 2 replies
  • 680 views

I have a quiz of 10 questions that each have 5 check boxes - the user should only be able to check one check box for each question. They can't be named the same as they need to have different tool tips but they also need to have different values. 

The document needs to be accessible.

 

How would this be able to be completed?

This topic has been closed for replies.
Correct answer try67

You would need to use the MouseUp event of each check-box in the "group" to clear the values of the others, then.

Let's say the first group is called Q1_1, Q1_2, Q1_3, Q1_4 and Q1_5.

As the Mouse Up event of Q1_1 enter the following code:

 

if (event.target.value!="Off") this.resetForm(["Q1_2", "Q1_3", "Q1_4","Q1_5"];

 

And similar scripts for the rest of them.

 

As for the export values you can just apply them directly to each field, and then add them all up in the total field. Since only one can be selected at any moment it should still work, even though they are not actually in a group.

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 23, 2021

You would need to use the MouseUp event of each check-box in the "group" to clear the values of the others, then.

Let's say the first group is called Q1_1, Q1_2, Q1_3, Q1_4 and Q1_5.

As the Mouse Up event of Q1_1 enter the following code:

 

if (event.target.value!="Off") this.resetForm(["Q1_2", "Q1_3", "Q1_4","Q1_5"];

 

And similar scripts for the rest of them.

 

As for the export values you can just apply them directly to each field, and then add them all up in the total field. Since only one can be selected at any moment it should still work, even though they are not actually in a group.

Bec W.
Bec W.Author
Known Participant
October 23, 2021

That worked!!!!!


Thank you! 

Bec W.
Bec W.Author
Known Participant
October 22, 2021

To clarify the different values are used because at the end of this form what ever check boxes are checked off they have a total of 0, 5, 8, 10, 11, 17 etc... and it gets calculated at the end.