Hide check box in matrix question | XM Community
Skip to main content
Solved

Hide check box in matrix question

  • October 2, 2020
  • 5 replies
  • 374 views

Hello,
I am trying to hide the check box in the bottom right hand corner (circled in red below). This way respondents would not be able to select the two exclusive "N/A" in columns & "N/A in rows"
image.pngAssuming custom CSS on this. Any help would be greatly appreciated!
Thank you.

Best answer by TomG

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" input:last").closest("td").find("*").hide();
});

5 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • October 2, 2020

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" input:last").closest("td").find("*").hide();
});


  • Author
  • October 2, 2020

Perfect, thank you!!


Forum|alt.badge.img
  • January 11, 2022

Hi, I am trying to hide or block some boxes in a matrix item like this one, that should look like a correlation matrix, but I am not getting it.
So far, I have set those boxes with a zero by default, but I don't want participants to be able to modify them, so I would like to hide those.
I have been trying with this code, but nothing has changed in the preview:
jQuery("#"+this.questionId+" tr.ChoiceRow:first input[type=text]").prop("disabled",true);


Could any one give me a hand with this? Thank you!!
image.png


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

https://community.qualtrics.com/XMcommunity/discussion/comment/42862#Comment_42862Your code will disable the text boxes in the first row. It doesn't hide anything. To do what you want, you need to define the cells to hide in an object where the keys are the scale points to hide and the values are arrays of rows to hide. Then loop through the object and the arrays within it to hide the contents of the matching scale/row combinations.


Forum|alt.badge.img
  • January 19, 2022

Thank you very much for your answer!! However, I am really new to javascript and am not familiar witht coding, so I would be enormously grateful if anyone had done something similar before and could share, so that I could have some code to look after.
Thank you all so much!!
Best