Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Keeping Elements Fixed During Randomization

  • maranda.nelson
  • maranda.nelson's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #269238 by maranda.nelson
Keeping Elements Fixed During Randomization was created by maranda.nelson
[object Object] Please help us help you and fill where relevant:
LimeSurvey version: [ LimeSurvey Community Edition  Version 6.10.3+250203]
Own server or LimeSurvey Cloud:
Survey theme/template:
==================
Initially I was working on surveys on  LimeSurvey Cloud   Version 6.10.4  and I was able to use the below function to keep elements in a fixed position during randomization.<script type='text/javascript'>/* Place option 5 at the end of the randomized list */$(document).ready(function() {var move_element="5";/* Please do NOT change the lines below */var move_element="javatbd{SGQ}"+move_element;$("#"+move_element).insertAfter("#question{QID} .answers-list .answer-item:last-child");});</script>
However when I tried using the same on the newly acquired [ LimeSurvey Community Edition  Version 6.10.3+250203], I get an error below:

Which of the following items have you bought for yourself/someone in your household in the last 12 months? {SGQ}"+move_element; $("#"+move_element).insertAfter("#question{QID} .answers-list .answer-item:last-child"); });
How can I solve this?

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 1 day ago #269242 by holch
check if the XSS filter is on. If so, switch it off. Seems like it is filtering the script.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose