Can I use JavaScript to do validation on a side by side question? | XM Community
Skip to main content
Question

Can I use JavaScript to do validation on a side by side question?

  • January 24, 2025
  • 0 replies
  • 28 views

MikeW
Level 5 ●●●●●
Forum|alt.badge.img+14
  • Level 5 ●●●●●
  • 137 replies

I have a number of side by side questions and I need to do a lot of validation. Is there a way of doing this using JavaScript?

For example, in the table below, each row can be left blank - BUT if a respondent puts in some answers on a row, then I need them to complete all the questions that are visible on that row. In this case the respondent shouldn’t be allowed to continue until they complete the row or clear their answers on the row.

I also need to check for certain odd combinations of answers. e.g. if a respondent ticks checkbox BBB, but has certain text in the BBB open. In this case, I’d just like a visible warning below the question that the combination is odd/ and is that really correct.

I don’t know if it complicates things, but this is in a table of contents block.

Any pointers would be greatly appreciated. I’ll be happy to use trial and error to get it working how I’d like, but some help getting started would be great.

Thank you

 

0 replies

Be the first to reply!

Leave a Reply