Displaying"not applicable" response option to only some statements in a matrix question | XM Community
Solved

Displaying"not applicable" response option to only some statements in a matrix question

  • 4 March 2019
  • 4 replies
  • 348 views

Hi, I have a questionnaire with 8 questions, answered on a Likert scale, 1-7. Two of the survey questions could be potentially not-relevant to some participants. Is it possible to add a 'not applicable' scale option but display it only for these two questions (i.e. hide it for the other six questions on the questionnaire?
icon

Best answer by Anonymous 14 March 2019, 19:55

View original

4 replies

Userlevel 7
Badge +33
You can do this first add N/A for all statements than you can hide like below

`Qualtrics.SurveyEngine.addOnload(function()
{
$('QR~QID21~1~8').style.display='none';
$('QR~QID21~2~8').style.display='none';
$('QR~QID21~5~8').style.display='none';
$('QR~QID21~6~8').style.display='none';
$('QR~QID21~7~8').style.display='none';


});`
Hi bansalpeeyush29,

Thank you so much for this. Unfortunately, I can't get it to work - it displays the N/A option for all statements (I did adapt Q and item number for my own survey).

In my output, the statements were listed as QID40_7 (etc), so tried using an underscore _ instead of a tilde ~ but that didn't work either. Tried using an underscore for the response option, e.g. QID40_7_8, which also doesn't work. Is there anything else you can think of?
Hello @Angco ,

If 'Not applicable' is the last scale point of the matrix question:

Paste the below code in the js(OnReady) of the matrix question

The below code will remove the NA option from second statement (as statement identifier starts with 0), so you need to update `eq(n)` , n as per your requirement

`jQuery(".ChoiceRow:eq(1) .last").hide();`
I kind of gave up on this end as I had some time constraints and used a workaround, but this will be very handy for next time. Thank you so much.

Leave a Reply