jeudi 2 juin 2016

In a calculation field in Gravity Forms, how do I get the number of checkboxes selected in a checkbox field?

I have a checkbox field that allows a user to select a number of weeks to register for, e.g.

Weeks

  • June 6 - June 10
  • June 13 - June 17
  • June 20 - June 24
  • June 27 - July 1

Now, I want to have an option,

Add Extended Care option for $75 per week?

  • No
  • Yes

so that if selected, a calculation field becomes 75 times the number of weeks selected.

I think I'm missing something obvious, because the only way this seems possible to me, is by assigning each week a value of "1" and writing a formula that sums all the week values. But then, this makes it impossible to distinguish from the form entries what weeks were selected. To get around this, I've thought of assigning each week an increasing value 1, 2, 3... and dividing each week's value by itself, e.g. /, to always yield 1 in the formula, while preserving unique values.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire