• Hi all,

    I am making a quiz on wordpress and here is what I want:

    After you have filled the answers and clicked teh submit button, there will be an explanation next to the wrong answer, like: “This is actually a …. species “.

    So it needs to be hidden and after clicking submit it will show.
    I have tried several things and I don’t get it to work.

    Here is the code for now: https://plnkr.co/edit/OvcwBzfFte4A0F0NbNSi?p=preview

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Edit: Sorry misread.

    Currently are you able to find which question was left empty or incorrect?

    Thread Starter jamilos

    (@jamilos)

    Well the problem is that I dont know how to put hidden text behind: answer 1. answer 2 etc without messing everything up. After you click on submit the hidden text must be visible.

    example:

    What is 1+1 ?

    A) 2 (hidden: that is correct !)
    B) 3 (hidden: try again)
    C) 4 (hidden: Now take 2 off)

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The first thing you’ll need to do is write the condition for each question, then on submit you can check whether the value of the input matches the condition (for A, B or C).

    Then you can add the explanations to the markup next to each question. You hide them by default and then show them when the conditions are met.

    Does that make sense?

    • This reply was modified 7 years, 5 months ago by Andrew Nevins.
    Thread Starter jamilos

    (@jamilos)

    yes it makes sense. Only I don’t exactly know how to implement that in my code.
    If I change something it won’t work.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Let’s see an example of that issue on the Plunker demo.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to put an explanation behind answers in a quiz’ is closed to new replies.