Calculating Personality Quizzes with Gravity Forms

For a recent project I had to determine the most commonly selected answer/value in a quiz submission. This quiz was built using Gravity Forms, so I added a custom merge tag that calculates the most common value in the submission array. This is useful for Buzzfeed-style personality quizzes, example: if you selected mostly ‘pony’ value answers you are a pony.

Once this information is available as a merge tag you can display conditional badges for each result.

10 Responses to “Calculating Personality Quizzes with Gravity Forms”

  1. CN

    Your code seems fantastic. Thank you so much for sharing! Would I need to add this in functions.php file?

    You know there is one thing you don’t with Gravity Forms quiz addon and that is sharing your result “I am pony” on social media. It would have been great if it did.

  2. Therry

    Hi! I put the gistfile1.php code in the functions.php. Where do you put the code in the gistfile2.txt?


Leave a Comment

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>