What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How do I tally up what gets selected in a series of checkboxes?Asked by carbonsquare 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!
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.
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?
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.
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
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.
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 https://www.jotform.us/form/61606250870149
I will get back to this once I have update.
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.
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: