How to disable/hide certain scale points in a matrix table? | XM Community
Skip to main content

Hi,
I am trying to hide a few scale points for specific statement options (e.g. point on the 11th row, 3rd Column)?
I tried to run this code under AddOnload on Javascript but it did not work.
$('QR~QIDa~b~c').up('td').childElements().invoke('hide');
a=Question QID
b=Row #
c=Col #
Was wondering if this could be because I am running certain display logics in my scale points and it may be confusing the system? I'm not well versed with Javascript and was wondering if there's another code I can use?

Additionally, i have a few different scale points to hide on my matrix table. Can I simply add the multiple different codes into the AddOnload on Javascript for them to all run together?
e.g.
$('QR~QIDa~b~c').up('td').childElements().invoke('hide');
$('QR~QIDd~e~f').up('td').childElements().invoke('hide');
$('QR~QIDg~h~i').up('td').childElements().invoke('hide');

Thanks so much!

To hide 11th row 3rd column, you can use below code:
var that = this.questionId;
var row = 11;
var column = 3;
jQuery("#"+that+" .ChoiceRow:eq("+(row-1)+") .c"+(column+3)+"").css({"pointer-events":"none","visibility":"collapse"});
Similarly, you can just change the row and column value and hide different cells.


rondev Thanks so much for your help! That worked!


Hi rondev , are you able to advise on how I can hide the scale points through another way of identifying them other than cell position?
I am running some display logics for my scale points and so the number of scale points which show up differs for various respondents, and the cell positions of the options I wish to hide change with various respondents.
Thanks.


Leave a Reply