Multi choice question with text entry | XM Community
Skip to main content

Hello everyone, 

I hope you are doing good !

 

I am new to Qualtrics and I just used this JavaScript technique which worked perfectlly well. There is only one question label which I would like to display in my survey do you know what should I add to this code “jQuery(“label”).hide();”. 

 

Here’s below the question I’m working on : 

So to be clear I would like to hide the question labels of the first 5 items and let the 6th one visible do you guys know what should I add to the code : jQuery(“label”).hide(); 

 

Thank you in advance for your help :) 

Try using this. It will hide all labels except for a specific one. As each answer option has 2 label elements, the 6th answer option’s label will be indexed at 11. I also added a line that will make the TextEntryBox elements span the question container while on desktop.

jQuery("#"+this.questionId+" label").not(":eq(11)").hide();

jQuery("#"+this.questionId+" .TextEntryBox").css("width", "100%");

 


Hi @Tata C ,

 

Instead of adding the script in the JavaScript option add the script as follows:

 

  1. Go to answer option → Rich content editor → HTML view.
  2. Paste the below code in all boxes except box 6.
  3. <script>jQuery(“label”).hide()</script>
  4. Make sure you don't have this code in question level JS option.

 

Hope this works.


Hi @Tom_1842

Thank you very much for your answer it worked very well as you can see below :)

 

 


Hi @SaurabhPujare_Ugam,

Thank you for your help :)

 

This option helps to hide the question label in the survey builder but not in preview, but thanks I found how to do it with the help of @Tom_1842 

 

Thank you guys !


Leave a Reply