How to validate a preceeding question? | XM Community
Skip to main content
Solved

How to validate a preceeding question?


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

Best answer by MohammedAli_Rajapkar

@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
View original

3 replies

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 23, 2018
You can do this by going to custom validation, on right in question properties.

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+39
  • Level 6 ●●●●●●
  • 1144 replies
  • August 23, 2018
And select validation will pass only if both variables are equal. For all other cases it will through error message.

MohammedAli_Rajapkar
QPN Level 5 ●●●●●
Forum|alt.badge.img+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