Can I remove entire columns (label and radio button) from a rank order question? | XM Community
Skip to main content
I have a radio button type Rank Order question with 5 items. However, we only want/need the respondents to rank their top 3 of 5 choices. How can I hide the label and radio buttons for 4 and 5? THANKS! !
Hi @Nadaly , Add following code in js Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/ jQuery(".c7 ").hide() jQuery(".c8,last ").hide() }); Hope it helps 😀
Hi @SaurabhPujare_Ugam I have the same question as @Nadaly. The JS code your gave is not working for me. Is there anything I missed or I should change? Thank you in advance for your answer.
Hello @Nadaly , Paste the below code in the js(onReady) of the radio button type Rank Order question jQuery("#"+this.questionId+" tr.Answers th:eq(3), tr.Answers th:eq(4)").hide(); jQuery("#"+this.questionId+" .ChoiceStructure tbody tr").find('td:eq(3)').hide(); jQuery("#"+this.questionId+" .ChoiceStructure tbody tr").find('td:eq(4)').hide();
The following code works also for _Rank Order_ question (just change "4" (once) and "5" (twice) depending on the size of the matrix and the columns you want to hide). Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/ for(var i=4; i<=5; i++) { jQuery(("#header~rank~"+ i.toString()).replace(/~/g, "\\\\~")).hide(); for(var j=0; j<5; j++) { jQuery(("#" + this.questionId + "~" + i.toString() + "~" + j.toString()).replace(/~/g, "\\\\~")).closest("td").hide(); } } });

How would I hide ONLY specific buttons on a particular row/column? The accepted answer is working for me, but I'm trying to adjust it to only hide certain buttons, not entire columns.
Thanks.