We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36626
    • 51 Posts
    Has anyone created a quiz in Revo? If so did you extend Formit or write a custom snippet? I'm trying to figure out the best approach. Any input is appreciated.
      • 30703
      • 51 Posts
      This really depends on how you would like to format your quiz. Is it a multiple choice list or something? If it was me, I'd probably write my own snippet but that's because I like a good challenge (and I'm often surprised at just how easily MODX allows you to achieve things).

      If you describe how you plan to present your quiz and what you plan to do with the results, I could answer your query better smiley

        Tom Dyer

        Designer/Animator/Web Developer - England, UK.
        http://www.bespokepixels.co.uk
        • 36626
        • 51 Posts
        Sorry, I should've added more details. It is going to be a multiple choice list. Id like the user to see their score and then have that score automatically emailed to the site admin. It would be nice if it could be a multi-page form, but not it's not a necessity. Perhaps some ajax to provide the user feedback.

        The part I find most challenging is making it so that the score is emailed to the site owner.

        Thank you for your response.
          • 30703
          • 51 Posts
          FormIt can probably handle your emailing requirements from the last page, and I presume you may have to add the seperate pages as resources within a "Quiz Page" resource container. That's how I'd go about it anyway. I'm at work right now, but I can ponder this later on and get back to you smiley

            Tom Dyer

            Designer/Animator/Web Developer - England, UK.
            http://www.bespokepixels.co.uk
            • 36626
            • 51 Posts
            Thank you for your help.
              • 30703
              • 51 Posts
              Hi there...

              I've been working on a solution for this, I've put together a method to get it done but I'm certain there is probably a better way to automate it. But just to show it can be done, see my example here:

              http://www.kick-as3.co.uk/development-tests/quiz.html

              I will get emailed your results from this too. So if this (cave-man style) solution looks OK I will happily send you the code and explain the structure. Maybe you can improve it but it should give you a head-start hopefully smiley

              I would explain it all now but it's 1:15am and I need to sleep! lol

              It's using FormIt and FormItRetriever to pass results to other pages, and then I wrote a custom snippet that checks the answers to let you know if they are correct or not.

              Let me know if its the type of thing you had in mind....

                Tom Dyer

                Designer/Animator/Web Developer - England, UK.
                http://www.bespokepixels.co.uk
                • 3749
                • 24,544 Posts
                Looks like a good start, but I think many people might want a "back" button.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 30703
                  • 51 Posts
                  Good point Bob. Added smiley although at this time of night I don't have the brain power to reselect previous answers... should be pretty easy though.

                    Tom Dyer

                    Designer/Animator/Web Developer - England, UK.
                    http://www.bespokepixels.co.uk
                    • 36626
                    • 51 Posts
                    That looks perfect. Much better than what I've managed to come up with. I'm a designer, so my php chops are limited. I could get a quiz working with just straight up php, but turning that into a snippet is beyond me. I really appreciate you taking the time to help me out .

                    I'll send you my email address through the example. If I manage to doctor it up with some jQuery or something I'll let you know.

                    thanks again