Trying to build a GF quiz following your useful samples shown in http://www.gravityhelp.com/forums/topic/mathematics-to-gravity-forms
That works beautifully for radio-button fields. I hit a wall, however, trying to incorporate checkbox fields with associated values. Here's a screenshot:
Trying to add up correct answers, the "score" field should increment by 1 for each choice checked within the checkbox field-id (with a value of 1). Currently, however, the "score" field is only incrementing by 1 for each field-id regardless of how many choices are checked by the user.
For example, using the screen shot above, if the user checked all three choices with a value of 1, the "score" field still only increments by 1, when we need it to increment by 3 for this field-id before moving on the next field.
Here is the current code in functions.php:
Is it possible to have "score" step through each choice within each field to sum the values, then move on to the next field and keep adding to the "score" value until the quiz is complete?
This quiz has 18 questions (18 field-ids). Most are checkboxes, but some are radio (yes/no) or (true/false). Here's a dev version of the quiz to look at:
Thanks for any advice anyone has!