Custom Javascript doesn't work on questions with Loop and Merge function | XM Community
Solved

Custom Javascript doesn't work on questions with Loop and Merge function

  • 9 October 2018
  • 1 reply
  • 9 views

I'm a novice at Javascript so I'll do my best to explain my problem - apologies if there are errors:

I am applying some custom javascript to an individual question, below, which is also part of a loop and merge function:
!

The code links to code in the Look and Feel and uses the Awesomplete library to create an autocomplete function, so that survey respondents can type the names of colleagues and the names autocomplete according to a list of employees in the respondent's organization.

The code works when I preview the individual question, or when I preview the entire survey and the question is not part of the loop and merge function. However, when I preview or launch the entire survey with the loop and merge function included, the autocomplete function doesn't work.

My assumption is that Qualtrics is somehow running the loop and merge when the page loads but not my custom script.

Does anyone have any suggestions for solutions? I can provide the code if necessary. Thank you!!
icon

Best answer by YASH1T 10 October 2018, 19:22

View original

1 reply

Badge +6
@JAWC if you could share your code , it will help to debug further. In the mean time: if your JS code is written based on questionID then you need to consider that in loop n merge Qualtrics change questionId (append/prepend running loop number to existing id) in each iteration.

Leave a Reply