How to count dropdown options for each field and have a total?

  • babanqwn
    Asked on August 1, 2025 at 2:14 AM

    The dropdown elements have the options "Yes," "No," and "Not applicable." There are a total of 5 questions, each with a unique name from q1 to q5. I want to display the counts of how many times "Yes," "No," and "Not applicable" were selected in three separate fields. What steps should I take to achieve this?

  • Dayron JotForm Support
    Replied on August 1, 2025 at 3:15 AM

    Hi babanqwn,

    Thanks for reaching out to Jotform Support. I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    Thanks for your patience, we appreciate it.

  • Dayron JotForm Support
    Replied on August 1, 2025 at 7:42 AM

    Hi babanqwn,

    This can be done with the help of calculation values and few widgets, my example contains only 3 questions, but you can adapt it to yours. Let me show you how:

    1. In Form Builder, locate the first question, and click on the Gear icon next to it.
    2. Open the Options tab.
    3. Enable Calculation values.
    4. Enter the values as shown in the image below.

    How to count dropdown options for each field and have a total? Image 1 Screenshot 90After this, add the same calculation values to all other fields you have. The next step is to add a calculation widget that will calculate the sum of these values:

    1. While in the Form Builder, click on Add Element button from the left.
    2. Open the Widgets tab.
    3. Click or drag the Calculation field to add it to the form.

    How to count dropdown options for each field and have a total? Image 2 Screenshot 101 From here, let's calculate the sum of selected options:

    1. Click on the Wand icon next to the field.
    2. From the right panel, click Add field button.
    3. Add each question from your form.
    4. Add + symbol between them, the click Save.

    How to count dropdown options for each field and have a total? Image 3 Screenshot 112 After this, let's find out the ID of this calculation field:

    1. Click on the Gear icon next to the calculation field.
    2. Open the Advanced tab.
    3. Expand the Field Details section.
    4. Copy the Field ID.

    How to count dropdown options for each field and have a total? Image 4 Screenshot 123 After this is done, you'll have to add a substring widget to your form. You can follow previous steps to see how to add it. Here's how to configure them:

    1. Click on the Wand icon next to the widget.
    2. In the Source field ID add previously copied ID.
    3. For Substring start add 2.
    4. For Substring end add 1.

    How to count dropdown options for each field and have a total? Image 5 Screenshot 134Repeat this for the rest of the widgets. In each widget, increase substring start and end by one. Here is an example for the configuration of Total No widget:

    How to count dropdown options for each field and have a total? Image 6 Screenshot 145Here is an example for the configuration of Total Yes widget:

    How to count dropdown options for each field and have a total? Image 7 Screenshot 156Take a look at the screencast below to see my results:

    How to count dropdown options for each field and have a total? Image 8 Screenshot 167 You can clone my form, for reference.

    Give a try and let us know how it goes.

Your Reply