Loop and merge using set of responses in a hidden question | XM Community
Solved

Loop and merge using set of responses in a hidden question

  • 25 August 2020
  • 2 replies
  • 56 views

I am using embedded data, to pre-populat from one to six responses (depending on which departments an employee interacted with). I would like to keep this list of responses hidden since they will be piped in and I will reference them in the intro...now I would like these hidden responses to be part of my loop and merge. Reading some of the other posts...I did find one bit of java script that I thought would be the answer to my issue, but when I tested it using three pre-populated responses, the loop and merge only showed the first item, not the other two. Here is the java script I used in the hopes it would allow my to keep my question/responses hidden but still show the piped in field in the loop and merge. Any advice would be welcomed!
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId).hide();
jQuery("#Buttons").hide();
});
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery('#NextButton').click();
});

icon

Best answer by SurajK 25 August 2020, 17:32

View original

2 replies

Userlevel 5
Badge +4

If you are looking for the code to hide the question text, then use the below, this will hide the question.
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('#Wrapper').css('visibility','hidden');
jQuery('#Wrapper').css('opacity','0');
jQuery("#NextButton").click();
});

Thank you! This worked perfectly!

Leave a Reply