Matrix questions: Hiding column with javascript doesn't work unless in Mobile Friendly mode | XM Community
Skip to main content
Solved

Matrix questions: Hiding column with javascript doesn't work unless in Mobile Friendly mode

  • January 14, 2022
  • 2 replies
  • 117 views

Forum|alt.badge.img

I am trying to create a simple, one-row likert scale question that looks like this:
Likert Success.pngReading advice here, I've figured out that I can do this by creating a single-row matrix question and adding this Javascript code:
Qualtrics.SurveyEngine.addOnload(function() {
  jQuery("#"+this.questionId+" .c1").hide();
});
The problem is that this code only seems to work in I enable "Mobile friendly" mode. And, while this question looks great on desktop, with mobile friendly on, it looks like this on mobile:
Likert Mobile.pngThe labels are gone, and now the question doesn't make any sense.
If I turn off mobile-friendly mode, for some reason, Qualtrics is adding a weird white space on the left side like this:
Likert Mobile Friendly Off.pngWhat's going on with this?
How can I get rid of this weird white space?

Best answer by TomG

The first anwer column is actually c4. Try hiding c1, c2, and c3.

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • January 14, 2022

The first anwer column is actually c4. Try hiding c1, c2, and c3.


Forum|alt.badge.img

Brilliant! Thank you!