Show only relevant statements | XM Community
Skip to main content
Question

Show only relevant statements

  • July 6, 2023
  • 1 reply
  • 27 views

Forum|alt.badge.img+2

Hey!

I am using Merge & Loop, but for some indices I have 3 statements, and for some less.

I want to do a Matrix Table, but I want to show for each index only the statement that are relevant for, and not show empty statements.

I have a JavaScript that worked on a multiple choice question, but it does not work here. Can you help me fix it please?

Qualtrics.SurveyEngine.addOnload(function() {
    jQuery("#"+this.questionId+" .Selection .LabelWrapper span").each(function() {
        var category  = jQuery(this);
        if(category.text().length == 0) category.closest("li").hide();
    });
});
Qualtrics.SurveyEngine.addOnReady(function()
{
    /*Place your JavaScript here to run when the page is fully displayed*/

});

Qualtrics.SurveyEngine.addOnUnload(function()
{
    /*Place your JavaScript here to run when the page is unloaded*/

});

 

 

 

1 reply

Forum|alt.badge.img+11
  • QPN Level 5 ●●●●●
  • 78 replies
  • July 12, 2023

Just add a display logic on extra statements and keep the condition as below