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.

Gravity Forms Quiz - Help Needed

  1. Hi There,

    I am trying to set up a Social Media quiz with an email opt-in at the end.
    Here is what I have: http://smgrader.com/

    I took the template from the "Leadership Quiz" shared in this thread:
    http://www.gravityhelp.com/forums/topic/mathematics-to-gravity-forms

    And I modified the questions, and made it into a multi-page quiz. So now if I can get this Quiz scoring (http://pastebin.com/RVMBL6SS) to work in my functions.php I should be good to go.

    I tried pasting the above quiz scoring in my functions.php, but it did not work. So here is my functions.php: http://pastebin.com/vX2s0yPv and if you can show me where to paste it in that would be awesome.

    Ideally I'd like to send quiz takers a score out of 100. Since there are 20 questions of course the formula is: correct answers x 5, but I am not sure how to write that in code so that it returns the calculation.

    Help with getting this quiz working will be greatly appreciated!

    Posted 12 years ago on Wednesday August 15, 2012 | Permalink
  2. Do you need help modifying the code to work with your form and also need to know where to place it in your theme's functions.php?

    If you need help modifying the code, I can help you with that, but I will need you to send me an XML export of your form (go to Import/Export under the Forms menu, then the top center menu item is "Export Forms" - do that for this one form and email it to me at chris@rocketgenius.com)

    As for where the code goes in your theme's functions.php, you can paste it right at the bottom. I don't think you need to remove anything from the code I provided or your theme's functions.php. There are no opening or closing PHP tags to worry about.

    Posted 12 years ago on Wednesday August 15, 2012 | Permalink
  3. Hi Chris,

    Here is my form export: http://pastebin.com/kdafRC7J

    If you can please help me make this quiz so it gives quiz takers a score at the end when they enter their email that would be awesome.

    Thank you!

    Posted 12 years ago on Wednesday August 15, 2012 | Permalink
  4. Can you post the answer key as well, or email it to me at chris@rocketgenius.com - I can guess at most of the answers but I would rather have the actual information to use. Thank you.

    Posted 12 years ago on Wednesday August 15, 2012 | Permalink
  5. Hey Chris,

    I just had my tech guy Garin send you an email!

    Look forward to getting this done; I have faith in your coding skills!

    Cheers

    Posted 12 years ago on Wednesday August 15, 2012 | Permalink
  6. I have the email and I'll take a look at this on Thursday.

    Posted 12 years ago on Wednesday August 15, 2012 | Permalink
  7. Please take a look at your site now http://smgrader.com/

    I modified the code and added it to your theme's functions.php. You will have to customize the message shown for each score, but the code is working and calculating properly for this form.

    Let me know if you have any questions.

    For reference, here is the code which provides a calculated percentage score instead of a raw "X of Y" correct answers: http://pastebin.com/A0t0bt38

    Posted 12 years ago on Tuesday August 21, 2012 | Permalink
  8. Chris,

    Thanks so much man. I really appreciate your help!!!

    Cheers

    Posted 12 years ago on Wednesday August 22, 2012 | Permalink
  9. You're welcome. Let us know if you need any more help.

    Posted 12 years ago on Wednesday August 22, 2012 | Permalink

This topic has been resolved and has been closed to new replies.