How do I hide a statement in a matrix table where the statements have been carried forward? | XM Community
Solved

How do I hide a statement in a matrix table where the statements have been carried forward?

  • 28 March 2019
  • 5 replies
  • 126 views

Badge +1
I have carried forward a list of randomized statements which include "none of the above" to a following question. As the respondent is rating the carried forward statements on a scale, it doesn't make sense to include "none of the above". I can't figure out how to remove or hide it.
!
!
icon

Best answer by TomG 28 March 2019, 21:29

View original

5 replies

Userlevel 7
Badge +27
Since "None of the above" is exclusive, use question display logic to only show the follow-up question if "None of the above" is not selected.

If you want to show the questions whether they select "None of above" or not, you can hide it with JS (I'm assuming that is a matrix question in your picture):
```
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" tr:last").hide();
});
```
Badge +1
Do I need to replace anything in JS you included? Other than questionId?

jQuery("#"+this.QID101+"tr:last").hide();
Badge +1
And do I paste it under ".addONload(function()"?

Obviously I'm very new to this....
Userlevel 7
Badge +27
> @elassit206 said:
> Do I need to replace anything in JS you included? Other than questionId?
>
> jQuery("#"+this.QID101+"tr:last").hide();

Don't change anything, including this.questionId. this.questionId is a variable that contains the current question id (e.g., QID101).

> @elassit206 said:
> And do I paste it under ".addONload(function()"?
>
> Obviously I'm very new to this....

The cost I posted includes addOnload. Copy what I posted and replace everything that is there.
Badge +1
Awesome! Thank you!!

Leave a Reply