Skip to main content
How to sum multiple score fields (0-10) to get a total score

Learn how to calculate the total score by summing multiple score fields and display the result using answer piping.

Updated over 2 months ago

In this tutorial, we'll walk you through the process of calculating a total score by summing multiple score fields (0-10) in your form.

Step 1: Set up your form

Add your score fields: Add multiple score fields to your form, such as Score1 and Score2. These fields will allow users to select a score between 0-10.

In this example, two score fields Score1 and Score2 are added to the form, each allowing scores between 0 and 10.

Add a variable field for total score: Now, add a Variable field to calculate the total score. Name it Total Score and assign an ID to it (e.g., total_score).

Add a content field for the total score: (optional) To display the total score, add a Content field.

This field will use answer piping to display the sum of all score fields.

Now, you can use logic to calculate the total score.

Step 2: Set up logic to calculate the total score

Go to the logic tab: In the form editor, click on one of the score fields (e.g., Score1), then go to the Logic tab from the right side menu.

Add logic for the first score field: Set the logic to add Score1 to the Total Score variable.

  • Condition: If Score1 is answered, then add Score1 to the Total score.

logic and calculation

Add logic for the second score field: Similarly, for Score2, set the logic to add Score2 to the Total score variable.

  • Condition: If Score2 is answered, then add Score2 to the Total score.

Step 3: Display the total score using answer piping

You can show the users their total score on the success page or a content field at the end of your form.

Use answer piping to show the total score: In the success page settings, use the answer piping feature to insert the total score.

  • Piping code: Use {{total_score}} or @total_score to display the sum of Score1 and Score2.

📝 Additional insights:

How to create answer piping: This guide will help you set up answer piping to display calculated scores on your result page.

Now, you can also see the calculated scores on your result table:

total score
Did this answer your question?