Force response if another question response is selected | XM Community
Solved

Force response if another question response is selected

  • 23 October 2018
  • 6 replies
  • 315 views

Badge +1
How do I force a response to a text entry question if certain responses in a matrix table are selected within the page? For example, I have a matrix with five scale points and eight statements. If the respondent selects a 1 or a 2, for any of the eight statements, I want their response to the next text entry question to be required/forced. The responses of 3, 4 or 5 for the eight statement enable the respondent to progress without forcing a response to the text entry question.
icon

Best answer by bstrahin 26 October 2018, 15:09

View original

6 replies

Userlevel 7
Badge +33
you can make this question force response and apply display logic for 1 or 2.
Badge +1
I want the text entry question to be visible and on the same page as the matrix table. Is that possible with display logic?
Userlevel 7
Badge +33
no in page display logic dont work for matrix question. force response get disabled.
Hello @Christaann ,

The requirement can be achieved using Custom code JS with following flow:

Create a Duplicate Next button on text entry question and hide real Next Button. On the click event of Duplicate Next button check whether If the respondent selects a 1 or a 2, for any of the eight statements, and(&&) the text is entered in the text box then pragmatically click real next button else show a error message
Userlevel 7
Badge +38
There's no need to write JS. You can use the custom validation feature built into qualtrics. Let's assume that the matrix is Q1 and the open end is Q2. Then your validation is:

IF Q2 is not empty
AND Q1 1 (Count) is greater than or equal to 1

new logic set
OR
Q2 is not empty
AND Q1 2 (count) is greater than or equal to 1

new logic set
OR
Q2 is empty
And Q1 1 (count) is equal to zero
And Q1 2 (count) is equal to zero

new logic set
OR
Q2 is not empty
And Q1 1 (count) is equal to zero
And Q1 2 (count) is equal to zero

I added a screen cap of the test I ran on this. In that example Q44=Q2 and Q40=Q1!
Userlevel 1
Badge +5

Thank you @bstrahin for that lovely answer. It helped me out with the same issue.

Leave a Reply