Help With Gravity Forms Script

Hello,

I'm using a script to calculate the number of checkboxes checked on this form: https://jencampbellyoga.com/gravity/

The script: https://gist.github.com/spivurno/077fd21a993e9b573d46

1. I'm not sure how to get the results to show once the form is submitted
2. I'm not sure if I have the parameters set correctly in the script

The parameters are:

- form_id the ID of the form for which you would like to count the checkboxes
[Currently: 'form_id' => 1,]

- count_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)
[Not sure what to put here]

- checkbox_field_ids an array of Checkbox field IDs whose checkboxes should count towards the checkbox count (when checked)
[Not sure what to put here]

- 'checkbox_field_ids' => 1
[Set this to one; not sure if correct]

Support access is granted.

Thanks in advance,
Casper

  • Nithin
    • Support Wizard

    Hi Casper,

    Hope you are doing good today. :slight_smile:

    Since it's a premium plugin, I'm not exactly sure how that works. I did give a look over the github code, and it seems like you have to add the correct form id, and count_field_id, and checkbox_field_ids of your form in your snippet:

    new GW_Checkbox_Count( array(
    	'form_id'            => 688,
    	'count_field_id'     => 8,
    	'checkbox_field_ids' => array( 6, 7 )
    ) );

    That is replace the above ids, with your current values. Your form Id is 1.

    If I'm not mistaken, the count_field_id is the field where you'll get the count output, as shown in the picture:
    http://gravitywiz.com/wp-content/uploads/2016/06/gw-checkbox-counter.gif

    You'll have to created create a new field with an ID, and add the corresponding ID to your snippet, as count_field_id.

    The checkbox_field_ids might be the ID of your checkbox, eg: choice_1_1_1, choice_1_1_2 etc

    If you still have issues, would recommend you to get in touch with Gravity Forms support, to get this sorted faster.
    https://www.gravityhelp.com/support/

    I hope this helps. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.