Skip to main content
Participant
March 9, 2018
Answered

Populating summary box only when activator field is triggered

  • March 9, 2018
  • 1 reply
  • 301 views

I have a questionaire with a series of numbers that I am calculating with the (Sum +) function. But I use the same questions (and values) for two different situations. One questionaire series when using a walking cane, for example, and one series when not using a walking cane. I realize that the summary boxes (2 of them) will always be calculated and filled in as the form is populated using the (Sum + function), as I have it arranged now. What I would like to do is use a trigger selector (with cane, and without cane) so that a summary box at the bottom of the form is only calculated when the selector radio button (with cane or without cane) is active. I'm not a javascript user, as yet, but am wondering if this form can be calculated using something other than javascript. I am familiar with if, then, else, loops, etc., coding, but am not an active programmer. I realize I need to get busy with Javascript. Thanks for your suggestions or referrals.

This topic has been closed for replies.
Correct answer try67

It can be done without JavaScript. You can create a set of two check-boxes "With Cane" and "Without Cane" with the export value of "1" and then multiply the sum by their value. If they are not ticked the result will be 0. If they are, it will be the sum.

However, doing it like that won't allow you to force a selection of only one box. In theory someone could tick both of them and have both sums show. I don't know if that's a problem for you or not. If so, then you would need to use a script to do it.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 9, 2018

It can be done without JavaScript. You can create a set of two check-boxes "With Cane" and "Without Cane" with the export value of "1" and then multiply the sum by their value. If they are not ticked the result will be 0. If they are, it will be the sum.

However, doing it like that won't allow you to force a selection of only one box. In theory someone could tick both of them and have both sums show. I don't know if that's a problem for you or not. If so, then you would need to use a script to do it.