How to hide a question | XM Community
Skip to main content

Hi there,
I have added a custom JS for hiding a multi choice question, please see the below.
but the code is not working for my exact requirement. I need the below options fulfilled.

  1. hide this question

  2. answers need to get select based on the embeded data

  3. this question need to run on a loop

  4. the selected option need to display each time the loop works.

Qualtrics.SurveyEngine.addOnReady
(function()
 {
 if("${e://Field/Pursuit%201}") this.setChoiceValue(1,true);
 });
  var that = this.questionId;
jQuery("#"+this.questionId).hide();
var t= "${q://QID38/ChoiceGroup/SelectedChoices}";
jQuery("#"+that+" .Selection").each(function()
{
if(jQuery(this).children("span.LabelWrapper").text().trim()==t)
{
jQuery(this).children('inputitype="radio"]').prop("checked", true);
}
});
});

Can someone help me on this.
Soorya

Be the first to reply!

Leave a Reply