How to allow only specific numbers in a response? | XM Community
Skip to main content
Solved

How to allow only specific numbers in a response?

  • May 12, 2020
  • 2 replies
  • 1120 views

dustinhillman

I am trying to customize some questions to only allow specific numerical responses (0-31, 999). The approach would potentially seem to be best in creating a javascript array with all the allowed numeric responses followed by running a if-then loop.

Would this be the best approach or is there a better method someone has already done that might work better?

Thank you for your time and feedback

Best answer by TomG

You can use custom validation to do this. It would be three conditions:
x equal to 999
OR x greater than or equal to 0
AND x less than or equal to 31

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • Answer
  • May 12, 2020

You can use custom validation to do this. It would be three conditions:
x equal to 999
OR x greater than or equal to 0
AND x less than or equal to 31


dustinhillman

Thank you so much for that clarification, TomG!