Number of selections (pick-list) calculated as a total?

  • Holland_Alyssa
    Asked on June 21, 2019 at 3:33 PM

    Hi- I am trying to total up a number of selections from a pick-list. Example:


    Which do you like?

    - Vanilla

    - Chocolate

    - Strawberry


    What pie do you like?

    - Apple

    - Pumpkin


    I want the calculate a total, so if you select vanilla and chocolate and pumpkin, it would total as 3. Is this possible?

  • Alan_D
    Replied on June 21, 2019 at 6:36 PM

    You can define calculation values as "1" for each option and get the sum of them with form calculation widget. Please look at these steps. 
    1. Define calculation values as "1" for multiple choice fields. This is for one of them. Number of selections (pick list) calculated as a total? Image 102. Add a form calculation widget to get the sum of the selected fields. Number of selections (pick list) calculated as a total? Image 21After, make this calculation. Number of selections (pick list) calculated as a total? Image 32The total field will show the number of selections. Number of selections (pick list) calculated as a total? Image 43Please try this workaround. We are glad to help you here.

  • Holland_Alyssa
    Replied on June 24, 2019 at 2:28 PM

    Hi-


    I'm using the Image Picker widget so I don't see that option. Is there anyway to code it in there to be a similar function?

  • Alan_D
    Replied on June 24, 2019 at 4:38 PM

    Unfortunately, since the Image Picker widget returns the URLs of the selections, there is no direct way to count them.

  • Holland_Alyssa
    Replied on June 25, 2019 at 9:03 AM

    Thanks Alan. Is there a way to include images in a regular picklist, a workaround? 

  • jherwin
    Replied on June 25, 2019 at 9:46 AM

    It's possible to count the selected items in the "Image Picker" widget. Please check my demo form below.

    Demo form: https://form.jotform.com/91753664112961

    You only need to add conditional logic for all possible combination of selection to your options.

    Guide: How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic

    You can clone my demo form to inspect and to know how it was done: How-to-Clone-an-Existing-Form-from-a-URL

  • Holland_Alyssa
    Replied on June 25, 2019 at 10:14 AM

    Perfect, thank you! Is there a way to make this more simple, say if I have 70+ options? 

  • jherwin
    Replied on June 25, 2019 at 10:25 AM

    Unfortunately, that's the only workaround I think will work for your requirements. If you want to simplify it, you can follow my colleague's suggestion. Put the option through multiple-choice elements and assign a calculation value.

    Guide: How-to-Assign-Calculation-Value