Validating across questions using JavaScript | XM Community
Solved

Validating across questions using JavaScript

  • 8 December 2019
  • 3 replies
  • 30 views

Userlevel 1
Badge +4
Question {Age) comes first, then several screens later come question (HowLong), I want to issue an error message if the value of (Howlong) is greater than the value of (Age)
icon

Best answer by npetrov937 12 December 2019, 13:43

View original

3 replies

Userlevel 4
Badge +4
Hi,

You do not need JS for that. You can use Piped Text and Custom Validation.

On your Howlong question, add Custom Validation so that the answer to that question is greater than the value of Age (pull the value of age using Piped Text).

Relevant links:
https://qualtrics.com/support/survey-platform/survey-module/editing-questions/validation/
https://qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/piped-text-overview/

Hope that helps.

Nikolay
Userlevel 1
Badge +4
Thank you very much Nikolay, this opens a great possibilities for this and other situations, your solution is very much appreciated
Userlevel 4
Badge +4
Hi @Isam ,

Great to hear that! Can you please mark the answer as Accepted so that future users can benefit?

Leave a Reply