Hide label for Rank Order Matrix Question | XM Community
Skip to main content

Hello -
I'm trying to add a don't know option to my rank order matrix question. So far, I've found how to hide the buttons and turn them off so as to separate the DK from the rest of the response options. What I'm tryin to do now is simply hide the labels of these two columns (see image below).
I've only seen how to hide entire columns, but I want to hide the labels ONLY.
My browser's select tool identifies this element as th#header~rank~5 and th#header~rank~6. but I can't find the code to hide these.
image.png

Use the code provided in the previous question. But instead of "inputs", use "th". This will give you a list of 10 elements. The first 5 related to the points (1-5), the next 5 to your choices(Money - Don't).


Huh. I entered the code:
let all_th = this.questionContainer.querySelectorAll("th");
all_th[5].hide(); all_th[6].hide();
However, now the screen is displaying as:
image.png


Hide, 4 and 5. Index starts from 0 not 1.
When you hide 6, the money cell is hidden and all the others in the row move one to the left.


Leave a Reply