Wrong and correct answers: validation | XM Community
Skip to main content

Dear community,

 

I’m creating a survey where participants face 5 comprehension questions.

They have overall 3 trials to answer all 5 questions correctly. Otherwise, they skip to the end of the survey.

What I would like to do is the following:

  • They try the first time
  • If they correctly answer the question, they move to another page where they see the correct answers in green and the wrong ones in red
  • On this second page, they do not have to insert again the correct answer, but only the wrong one.

Is it clear? do you have any suggestions?

Thanks

 

Hi @TiCi LONG MESSAGE ALERT!!!
I am sure this could be possible with Javascript but it can be also done without it but will be quite lengthy. 

 

STEP 1: Create 5 questions, each one in a separate block.

STEP 2: Create the below setup in the survey flow.


The use of this embedded data will be explained in the step 3 so please feel free to ignore it for now.
I have created groups to simplify the setup and make it less complicated.
First branch logic set will be for the correct answer. If the correct answer has been selected it will follow this route and respective embedded data will be assigned. Repeat the same group logic for other groups as well i.e., Q2, Q3, Q4 and Q5; each group will have 2 such branches i.e., correct answer selected and not selected. See images below.
NOTE: You can use the embedded data names as per your choice. And replace the value in the branch logic with your own correct answer, I have used dummy values just for you to explain.
After all the branch logic sets a new block containing a table question will be added which will display the correct and wrong answers to respondents. See image below.

 

You’ll need to create one more text/graphic question Q6. This is created using pipe text values which will show the selected answer choice and whether its right or wrong with the help of embedded data created in the survey flow in the above steps. I have assigned the green and red color to the ‘right’ and ‘wrong’ embedded data value respectively. At a time both of them won’t be having values so there’s no chance that both the values will be seen together, and to know how this has been taken care off please see further steps.
And at the very bottom please add one more branch which will be for the respondents who answer correctly in the first trial itself so the survey will be ended directly for them.

STEP 3: This step is for ‘Trial 2’ i.e., if there is a wrong answer in the Trial 1, respondent will move to Trial 2 phase.

Please see the above branch logics which will display the questions again but only which had been answered incorrectly by the respondents.
This branch logic will handle the following use case:- If the respondent selects an incorrect answer in the first trial and then corrects it or vice versa then the value for  that particular embedded data should be emptied so that it doesn’t displays in the table (because any embedded data having no value isn’t displayed via the pipe text). So it will be assigned an empty/blank/null value with the help of ‘empty’ embedded data.
Repeat the same logic set for other groups as well, see images below.
Again the table with the answers will be shown at the bottom.
Similar to that of in step 2, survey will be ended if the respondent selects all correct answers in Trial 2.

STEP 4: This is for the respondents who are not able to give correct answer even in Trial 2. This will be a repeat of step 3 so I am only attaching images with no explanation.
 

No need for branch logic at the end to end the survey as it is the last trial itself and survey will be ended anyhow for the respondent.
This is how the overall setup will look like.

END!

I have done enough tests to make sure it runs without any issue hope it works for you as well!


Leave a Reply