How to validate a preceeding question? | XM Community
Solved

How to validate a preceeding question?

  • 23 August 2018
  • 3 replies
  • 170 views

I'd like to validate a previously entered question by requesting that it be entered in a subsequent question (i.e. "enter email"... "please verify email"), with an error message displayed if the second entry doesn't match the first. How can I do this?

Thanks!
Tyler
icon

Best answer by MohammedAli_Rajapkar 23 August 2018, 09:34

View original

3 replies

Userlevel 7
Badge +33
You can do this by going to custom validation, on right in question properties.
Userlevel 7
Badge +33
And select validation will pass only if both variables are equal.

For all other cases it will through error message.
Userlevel 7
Badge +20
@tyrobbie

For the first question apply "content validation" as "email address"
For the second question apply "custom validation" (i.e. second question input should exactly match with first question value".
To capture the first question value (response) you will have to piped-text the input of it. You can do it by using "piped-text" feature. Below is the step
- click on second question "question text".
- click on "piped-text" option which is shown in blue color
- select your question (i.e. previous question)
- piped-text the response of the previous question (i.e. selecting the second option from the drop-down. The first option will only give us the question text)
- Then "cut" the piped-text code
- paste it in the custom validation text box.

Attached is the qsf (survey export) for this use case. You can import it to see how you can implement it in your actual survey.
Test survey url: https://qimpl.az1.qualtrics.com/jfe/preview/SV_bsm0Y1pYBHDGW3j?Q_SurveyVersionID=current&Q_CHL=preview

Leave a Reply