How to Create a Survey with calculated results?

  • goodforgirlsinc
    Asked on May 22, 2024 at 10:04 AM

    I want to create a self-confidence survey where the results of the survey are added and a result is provided based on the range the total falls in.

  • Ericson_B JotForm Support
    Replied on May 22, 2024 at 10:43 AM

    Hi Lori,

    Thanks for reaching out to Jotform Support. You can create a survey containing questions, assign a calculation value to each option, and then use a Form Calculation widget to calculate the total. Then, add Short Texts and specify the default value for each range. Let me show you how:

    First, you can include questions using the Single Choice, Multiple Choice, Dropdown, or even the Star Rating.

    1. In Form Builder, select Add Form Element in the upper-left corner.
    2. In Form Elements, select your preferred element.
    3. Select your Element's Gear icon to open properties.
    4. Go to Options tab and enter the selections in the Options textarea.
    5. Next, toggle Calculation Values to On. Then, enter calculation value to each options in the field. See, How to Assign Calculation Values for more information.

    How to Create a Survey with calculated results? Image 1 Screenshot 70Next, we'll add Short Texts for the Range and set the Default Value.

    1. In Form Elements, select Short Text.
    2. Select your Short Text's Gear icon to open properties.
    3. Go to the Advanced Tab, enter the Default Value, and set it to Read Only. 

    How to Create a Survey with calculated results? Image 2 Screenshot 81We'll now add the Form Calculation Widget to get the sum of all the questions in the form. 

    1. Select Add Form Element in the upper-left corner.
    2. In the left pane, go to Widgets at the top and select Form Calculation.
    3. Click Add Field and select the questions, making sure to include a + symbol after each one. Once completed, click Save. To learn more, see How to Perform Calculations Using a Widget.

    How to Create a Survey with calculated results? Image 3 Screenshot 92Finally, set up Show/Hide field conditions so that if the number falls within that range, we display the range. See, How to Show or Hide Fields Conditionally for more intormation.

    1. Go to Settings at the top.
    2. Select Conditions on the left.
    3. Add a new Show/Hide Field condition.

    How to Create a Survey with calculated results? Image 4 Screenshot 103Here's how the conditional logic looks like:

    How to Create a Survey with calculated results? Image 5 Screenshot 114How to Create a Survey with calculated results? Image 6 Screenshot 125Check out my demo form to see how it works.

    Give it a try and let us know if you have any other questions.

  • Lori Stephens
    Replied on May 23, 2024 at 8:44 AM

    I did everything and my calculation is coming out 0. It was working at one point but no longer.

  • Eliza JotForm Support
    Replied on May 23, 2024 at 9:31 AM

    Hi Lori,

    Thanks for getting back to us. I cloned your form and tested it to see if I could replicate the issue, but everything was working properly, as the Calculation widget is showing the correct total value. Check out the screencast below to see my results:

    How to Create a Survey with calculated results? Image 1 Screenshot 120

    But, I noticed that the three 'Score' fields are not yet set up to be shown or hidden, depending on the total score. Check out the screencast below:

    How to Create a Survey with calculated results? Image 2 Screenshot 131

    To fix this, we need to edit the Show/Hide Field conditions that you have on your form, and add two more Show/Hide Field conditions. Let me walk you through it:

    1. In Form Builder, click on Settings in the orange navigation bar in the upper part of the page, and go to Conditions.
    2. Hover your mouse over the first set of conditions, and click on the pencil icon.
    3. Set the IF conditions as shown in the screenshot below: How to Create a Survey with calculated results? Image 3 Screenshot 142
    4. Set the DO conditions as shown in the screenshot below: How to Create a Survey with calculated results? Image 4 Screenshot 153
    5. Click on Save. The screencast below shows how it's done: How to Create a Survey with calculated results? Image 5 Screenshot 164
    6. Still under Conditions, click on Add Condition in the upper part of the page.
    7. Select Show/Hide Field, and set the IF conditions as shown in the screenshot below: How to Create a Survey with calculated results? Image 6 Screenshot 175
    8. Set the DO conditions as shown in the screenshot below: How to Create a Survey with calculated results? Image 7 Screenshot 186
    9. Click on Save. The screencast below shows how it's done: How to Create a Survey with calculated results? Image 8 Screenshot 197
    10. Click on Add Condition again, and select Show/Hide Field.
    11. Set the IF conditions as shown in the screenshot below: How to Create a Survey with calculated results? Image 9 Screenshot 208
    12. Set the DO conditions as shown in the screenshot below: How to Create a Survey with calculated results? Image 10 Screenshot 219
    13. Click on Save. The screencast below shows how it's done: How to Create a Survey with calculated results? Image 11 Screenshot 2210

    Let us know if there’s anything else we can help you with.

 
Your Answer