Simple Radio Button Count [RESOLVED]

Hi all,

I am using Gravity forms to create a simple pages form, each page has a single question on it with 3 radio buttons, I have radio 1 as ‘A’, radio 2 as ‘B’ and radio 3 as ‘C’, this is the same on every question, what I need to do is count how many ‘A’, ‘B’ and ‘C’ I have checked and then take the user to a specific landing page depending on whether they selected mostly 'A’s, mostly 'B’s or mostly 'C’s, is there an easy way of checking how many time my first radio button in a question is checked and then the second etc. I had thought about using a Survey or a Quiz but I’m not either of those will do what I need.

Thanks

You can do that with some PHP after the form is submitted, but before the confirmation is shown. The time to do it would be gform_pre_submission.

You can look at the $_POST and count the number of times an A, B or C response was selected, then store those counts in a field in the form. That field then becomes the basis for conditional logic for your landing page (Confirmation).

There used to be an add-on that did this work for you (counted the most frequently selected answer values and then you could use that count in conditional logic.) It’s still available and I am not sure if it still works. Might be worth a look?

Hey Chris,

Thanks for the info, I actually just decided to do this by using $_POST to look at the individual fields as there where only 7 Questions anyway and then just checked out the value of the selected Radio and basically just added up the 'A’s, 'B’s and 'C’s and then did a confirmation redirect from within the functions.php file, all seems to be working fine.

Thanks again
Scott Sibson

Glad you were able to solve that.