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

  • Profile Image
    Holland_Alyssa
    Asked on June 21, 2019 at 03: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?

  • Profile Image
    Alan_D
    Answered on June 21, 2019 at 06: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. 15611560895.png2. Add a form calculation widget to get the sum of the selected fields. 15611563196.pngAfter, make this calculation. 15611564127.pngThe total field will show the number of selections. 15611565388.pngPlease try this workaround. We are glad to help you here.

  • Profile Image
    Holland_Alyssa
    Answered on June 24, 2019 at 02: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?

  • Profile Image
    Alan_D
    Answered on June 24, 2019 at 04:38 PM

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

  • Profile Image
    Holland_Alyssa
    Answered on June 25, 2019 at 09:03 AM

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

  • Profile Image
    jherwin
    Answered on June 25, 2019 at 09: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

  • Profile Image
    Holland_Alyssa
    Answered 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? 

  • Profile Image
    jherwin
    Answered 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