PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Can Gravity Forms Do This?

  1. Is it possible for gravity forms to take in inputs and then output a score based on the inputs provided? Say I want to calculate productivity score of a person. I as them various questions and finally they are given a score based on their inputs.

    I know it might not be possible out of the box, but is there a way to add this functionality to gravity forms maybe by hiring a programmer? Or is it something that can be easily achieved?

    Thank you.

    Posted 11 years ago on Tuesday January 1, 2013 | Permalink
  2. This is possible. Calculations are built in, and you can always use the gform_pre_submission_filter to perform your own complex calculations and store those results.

    http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter

    If you post a more specific question, we can help you with additional tips or suggest help if you will need programming assistance.

    Posted 11 years ago on Tuesday January 1, 2013 | Permalink
  3. Here is one example of figuring a score after the form is submitted:
    http://gravity.chrishajer.com/leadership-iq-test/

    There are many others if you can let us know what you want to do exactly.

    Posted 11 years ago on Tuesday January 1, 2013 | Permalink
  4. I have something similar in mind. However, I'd also require to give a dynamically generated badge saying your score is this.

    Is it also possible to keep a history of scores for a particular user and then see how scores have improved?

    Posted 11 years ago on Tuesday January 1, 2013 | Permalink
  5. You can generate your badge using CSS or PHP or an image and overlay text, however you like. That is up to you. Once you have the score, you can do whatever you want with it. It will all be done at the same time.

    All the entries (scores) will be stored, but each entry is unique and not related to any other. There is no 'user history', so the user would not be able to see how their score improved over time. The administrator could.

    Posted 11 years ago on Wednesday January 2, 2013 | Permalink
  6. Can you point me to some script that can generate the image with the overlay? I tried finding online, but couldn't come across any.

    Posted 11 years ago on Thursday January 3, 2013 | Permalink
  7. There are lots of tutorials online. I would look at the PHP GD library functions. http://php.net/manual/en/ref.image.php

    You can use the PHP function imagecreatefromgif or imagecreatefrompng or imagecreatefromjpeg to start with an image, and add your text. or combine two imagess The work you do to create the badge will be done in PHP using the information collected by Gravity Forms.

    You could also cheat a little and just display an image in a div and position the text score over the top of it. I'm not sure how that would print though. That is one drawback of my previous suggestion. If you create a complete image with the badge and text, it should print fine (if you are concerned with printing it.)

    Posted 11 years ago on Thursday January 3, 2013 | Permalink
  8. I like the cheat :)

    Thanks for the great suggestion. I wouldn't be that concerned with printing as of now.

    I assume I can also add people to my Mailchimp list using the add-on once they have submitted.

    Thanks for your help.

    Posted 11 years ago on Thursday January 3, 2013 | Permalink
  9. David Peralty

    You can add people to your Mailchimp list using the add-on. All my best!

    Posted 11 years ago on Thursday January 3, 2013 | Permalink