Custom validation with JavaScript variable | XM Community
Question

Custom validation with JavaScript variable

  • 21 February 2024
  • 3 replies
  • 50 views

Badge +1

Hi all,

I have 2 questions with text entry in the same page. I need to use custom validation for question 2 depending on the text entry in question 1. Could you help me to do that.

 

Best


3 replies

Userlevel 7
Badge +27

Use the value from question 1 in the custom validation condition for question 2.

Userlevel 5
Badge +12

Hi @Nahed , Below is the visual representation of what TomG is saying.

Use custom validation

 

I have kept the validation as ‘Q2 value should be equal to that of Q1’ by using pipe text value of the Q1 entered choice. You can modify it according to your need i.e., less than, greater than, etc. 
Badge +1

Thank you so much for your help.

Leave a Reply