How to create Quiz form and apply conditional logic?

  • jasonbook
    Asked on April 15, 2024 at 1:48 PM

    I have tried to create a multiple choice quiz that would tell the user if they answered correctly or not with each question.


    For example:

    Question: How many tires does a car have

    1

    2

    3

    4

    If 1,2 or 3 are selected I'd like a message to pop up and say "Sorry, this is incorrect. Please see section X of the handbook for the correct answer."

    If 4 is selected I'd like a message to say "Correct! Please see section x of the handbook for more information on this topic"


    However as far as I can tell the only way to do this is to have a single choice question with two hidden paragraphs and four conditional statements for each question. The paragraphs can be duplicated easily but to put four conditions on each question would take forever in a 100 question quiz. I tried using the "is equal to" and "is not equal to" but apparently these are conflicting conditions and it does not work.

    I'd also like it to give them a score at the end of the quiz.

    Is there an easier way to do what I want?

    Jotform Thread 13905261 Screenshot
  • Wilson JotForm Support
    Replied on April 15, 2024 at 4:09 PM

    Hi Jason,

    Thanks for reaching out to Jotform Support. It's really easy to create a quiz Form with Jotform and add conditional logic for the Incorrect and Correct answer errors. Let me show you how:

    1. In Form Builder, select Classic Form and click on Add Form Element at the top-left side of the page.
    2. You can set up your form first by adding the question using single choice and the error message using the paragraph field to pop up on the target data that the submitter selected.
    How to create Quiz form and apply conditional logic? Image 1 Screenshot 40
    3. You can hide the Paragraph field and add a page break to skip to the page once the submitter selects the answer that you will set up on your condition logic.
    How to create Quiz form and apply conditional logic? Image 2 Screenshot 51
    Check out the screencast below to see my results:
    How to create Quiz form and apply conditional logic? Image 3 Screenshot 62
    You can clone this demo form for you to test it more.

    Give it a try and let us know how it goes.