Custom validation with JavaScript variable | Experience Community
Skip to main content
Question

Custom validation with JavaScript variable

  • Feb 21, 2024 11:14 AM UTC
  • 3 replies
  • 124 views

Forum|alt.badge.img+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

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Feb 21, 2024 12:49 PM UTC

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


Forum|alt.badge.img+23
  • QPN Level 5 ●●●●●
  • Feb 21, 2024 4:21 PM UTC

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. 

Forum|alt.badge.img+1
  • Author
  • Feb 21, 2024 5:26 PM UTC

Thank you so much for your help.