How do I tally up what gets selected in a series of checkboxes?

  • Profile Image
    Asked on July 13, 2016 at 02:30 PM

    I have a form that uses checkboxes for a multi-person registration. Depending on the Sponsor type selected the form will show 8 or 4 or 1 participant area that allows for the Activity Selection of Golf, Tennis, Spa, or Social.

    See form here...


    I have four hidden fields on the form (Total Golf, Total Tennis, Total Spa, Total Social) that I would like to populate depending on the checkbox selections. Example: If Golf is selected three times & Tenni one time I want the number 3 to be calculated in the Total Golf count field and the number 1 to be calculated in the Total Tennis count field. The other two would stay as 0s since they were not selected.


    Is there a simpler way to do this without having 32 plus conditional statements based on the selection of each checkbox group? Thought I would ask. Thanks for any help you can provide. All the best!



  • Profile Image
    Answered on July 13, 2016 at 03:58 PM

    I have checked your form, but unfortunately, I do not think that we have any efficient solution to this.

    We do not have an option to count specific answers of selected check box / radio button fields.

  • Profile Image
    Answered on July 13, 2016 at 04:11 PM

    I guess i have to add more fields and conditional logic then. Four more hidden fields per section... subtotal1golf, subtotal1tennis, subtotal1spa & subtotal1social. Then set those based on conditional logic like if activity1 is equal to golf then put 1 in subtotal1golf, etc. etc.


    Then at the end add up subtotal1golf, subtotal2golf, etc. to dump into totalgolf field.


    What do you think?

  • Profile Image
    Answered on July 13, 2016 at 05:03 PM

    Can you please describe how the user was suppose to select more than once a checkbox option on your form?

    I check the form, but I cannot figure out how the current person/user will select the same checkbox more than once while not yet submitting the form.


    I can only redo the selection of the same item if I will submit the form first and then repeat. 


    Now if you want to tally the multiple selected same checkbox item, you can do it using the submission data instead -- that is by creating a report. Excel or spreadsheet report will have the option.

    We will wait for your response. We will check more for a solution once we have a better understanding of your requirement.



  • Profile Image
    Answered on July 13, 2016 at 08:23 PM

    Thanks for your follow up. The user will only select one Activity from each activity selection. If they Sponsor level is the first highest $25K selection in the dropdown, then up to 8 participants can be entered. If they select Diamond through Founder then 4 participants can be entered. The Individual and Social Only selections are the only ones that allow just 1 participant entry.

    So, select Founder in the Sponsorship Type dropdown and you will see 4 participants. The Sponsor will fill in the 4 participants and select which Activity Selections each of them will participate in (Golf, Tennis, Spa or Social).

    Yes, we wish to tally the selections for each submission on the reports, including a visual report bar graph like below...


      X        X       

      X        X       X

      X        X       X      X

    Golf  Tennis  Spa  Social


    Any ideas on how to do this with minimal extra fields and conditional logic?


    Thanks for trying to help us out. Love the power of Jotform as we produce creative form solutions for our clients registration needs. 

  • Profile Image
    Answered on July 13, 2016 at 09:41 PM

    Thank you for the detailed explanation of the requirement. We appreciate it. :-)

    In theory, I think using the Calculation Value of the checkboxes will minimize the need of condition logic rules needed.

    User guide: How-to-Assign-Calculation-Value

    Allow me some more time to explore and check how to make it work on your form

    I will get back to this once I have update.


  • Profile Image
    Answered on July 14, 2016 at 04:49 AM

    One more thing is that is sometime is registering as a Social Only sponsor, the Activity selection is hidden because they are not permitted to select golf, tennis or spa. So you don't see that field on this selection. They can however enter dietary restriction and shirt size values. With this selection the total social field defaults to 1 while other total field would be blank or zero. 
  • Profile Image
    Answered on July 14, 2016 at 08:12 AM

    I've created a separate thread for you, so anyone in the support staff will be able to assist you with your specific requirement. Please follow up there: