I’m making a form that is for a summer camp registration form where users will be registering. By the end of the form there is an option of paying in full or making a $50 deposit for each camp selected. I’m using hidden products to handle the total amount per week and adding their value into the total. My question comes if I can use formulas to count the number of checkboxes that have been selected and do the calculations.
Example:
Week 1:
- Soccer camp
Week 2:
- Computer camp
Total: $100 (Deposit)
I actually have a snippet for this:
https://gist.github.com/spivurno/077fd21a993e9b573d46Updated: https://gist.github.com/spivurno/a14ef4a18f57d0c67811e1b4d8791781
The parameters are:
form_id
the ID of the form for which you would like to count the checkboxescount_field_id
the ID of the field into which you would like to populate the checkbox count (you can then use this field’s merge tag in a Calculation formula)checkbox_field_ids
an array of Checkbox field IDs whose checkboxes should count towards the checkbox count (when checked)