Dear all,
I need some help! I tried some custom coding in JavaScript but it is not working. :(
The survey is structured as the following:
PAGE 0
Welcome Page.
PAGE 1
Introduction Page: A paragraph about a story on fruit, animal and birds.
PAGE 2
In this page I have three questions in one page.
Q1: Choose the correct fruit.
Option A: Apple
Option B: Orange
Option C: Pear
Option D: Banana
The correct answer is: Apple and Orange. [ Respondents need to choose both]
Q2: Chose the correct animal.
Option A: Bear
Option B: Tiger
Option C: Cat
The correct answer is: Cat. [Respondents need to choose only one answer]
Q3: Choose the correct bird.
Option A: Crow
Option B: Peacock
Option C: Duck
The correct answer is: Crow. [Respondents need to choose only one answer]
What I am trying to do:
1) If any of the questions are answers incorrectly by a respondent, I want the following message to show up: “ Incorrect answer. Please try again. If you wish please go back to the Introduction page by clicking this button.” => I need to show them a custom button that will take them to the Introduction page if they wish to. If they wish not to go to introduction page. They can retry the quiz [May be this can be a button too if there is no other way]. But, they will not be allowed to move forward to the next page unless they get all the questions correct.
2) If they get all the answers correct. Then I want to display: “Correct. Please proceed to the next step to continue.” => This can be done by display logic but the display logic is somehow interfering with any custom code in JavaScript. I am not sure what is happening.
Could you please help me with this? I need it for my research and I would really really appreciate it.