Skip to main content
Participant
February 21, 2024
Question

calculate value based on radio button selection

  • February 21, 2024
  • 1 reply
  • 528 views

I'm working on an assessment tool which requires scoring for each of 15 questions based on values assigned to radio button options. I'd like each question to recieve one score in a hidden text field, so I can then get a sum for selected questions (i.e. questions 3, 6 and 12) as a subset score. Questions are labeled as "group1" through 15; Options are labeled "choice1" through 5. Here's an example question (value in parentheses):

 

In the past 10 days, how much were you bothered by a coworker?

  • Not bothered (0)
  • Slightly bothered (1)
  • Bothered (2)
  • Significantly bothered (3)
  • Extremely bothered (4)

 

I figure the same script could be used for each questions, all are formatted the same way. Any help is appreciated.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 21, 2024

Instead of "Choice1" or "Choice5" use just "1" and "5" as the export values, and then you'll be able to use the built-in Sum option under the Calculate tab of your text field to do it.

Nesa Nurani
Community Expert
Community Expert
February 22, 2024

No need to change, with built-in sum function "Choice1"-"Choice5" will work just fine.

try67
Community Expert
Community Expert
February 22, 2024

So it does! But if you want to export the form data to another format it's better to have correct export values.