Custom Validation for Side by Side Question - Only allow one column to be answered | XM Community
Skip to main content
I currently have the following side by side question written. !

I want an error to pop up if respondents have chosen an answer for multiple columns of the same row, they should just be choosing an answer for one of the three columns. Is there a javascript code to do this?
@Chrissy So if I understand correctly, you want the respondent to choose _only_ "Required", "Preferred", or Optional. I would actually render the question differently so that it's clearer for the respondent, because from the respondent's point of view, if I see a matrix question, my impulse is to respond to all three columns.



Instead, I would break this into two questions (for the user experience -- in your survey it will show up as four)

Question A: Something to the effect of is _x_ Required, Preferred or Optional. Then set up display logic so that each of the following three questions is displayed if the respondent chooses each option in Question A.

Question B: "You chose 'Required'. How would you rank the following options: 4 Gas Monitor, etc.

Questions C and D would follow with similar language for the 'Preferred' or 'Optional' choices.



In this way, it's a much clearer respondent experience and you're also more likely to not run into accessibility issues.



Hope this helps,

Adam

Leave a Reply