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.

Basic Form Calculation

  1. edwardr
    Member

    Hi Everyone,

    I'm hoping someone can help me. I'm looking to calculate a score based on the total score of the questions in the following quiz:

    http://edwardrjenkins.com/testing/10045-2/

    I've reviewed this excellent post as a starting point but still need a little help.

    http://www.gravityhelp.com/forums/topic/create-a-quiz-with-gravity-forms

    Basically, the function needs to multiple the total score of each of the questions by 2.

    Any help would be greatly appreciated.

    Posted 11 years ago on Wednesday June 13, 2012 | Permalink
  2. Edward, are you familiar with the calculation ability that is now built-in to Gravity Forms? If you add a number field and check the box that says perform calculation you can perform a calculation that would use merge tags and add up the values of those answers on your form and then display the result in the calculated field. Give it a try and let me know if you run into any issues.

    Posted 11 years ago on Wednesday June 13, 2012 | Permalink
  3. edwardr
    Member

    Whoops - I didn't see your reply and just posted a dupe because I couldn't find my thread. I'll check this out.

    Posted 11 years ago on Thursday June 14, 2012 | Permalink
  4. edwardr
    Member

    But that only works with the single-line number field, correct? It wouldn't let the users select the number via radio buttons.

    Posted 11 years ago on Thursday June 14, 2012 | Permalink
  5. You can do calculations based on radio buttons as well. In your calculation, just use the merge tag for each of your radio button fields. Your formula would look something like this:

    ( {Test 1:8} + {Test 2:9} )

    Those were two radio fields I created, Test 1 and Test 2.

    Screenshot 1

    Screenshot 2

    Screenshot 3

    Posted 11 years ago on Thursday June 14, 2012 | Permalink
  6. edwardr
    Member

    Wow! It's like the light has been turned on. I understand now. Thank you so much -- it's really appreciated.

    Posted 11 years ago on Friday June 15, 2012 | Permalink
  7. No problem at all, have fun!

    Posted 11 years ago on Saturday June 16, 2012 | Permalink
  8. Does this also work for products? I have an upgrade option that I want to have add to the total of my product's cost.

    I am also looking to see if I can also find a way to validate a number before the form is submitted. I already have a number field totaling the number of pitchers ordered. The number has to be 8 and nothing else. I saw a brief bit on how to do custom form validation -- would that be the way to go about it or is there a simpler solution?

    Posted 11 years ago on Monday June 18, 2012 | Permalink