Welcome to the LimeSurvey Community Forum

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

Script gets removed from question source

  • keunes
  • keunes's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 9 months ago #230805 by keunes
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.27
Own server or LimeSurvey hosting: Own
Survey theme/template:
==================
Hello,
I would like to have a multiple short field question with autocomplete for a survey we're creating for AntennaPod . I'm taking inspiration from the thread Ajax autocomplete data from a database for multiple short text questions filters .

However, when I add the script in the question source, save and then reload the question edit page, the script is removed from the question source. I've also tried importing the survey (*.lss) that was shared in the other thread. In both cases, (large) chunks of the script are ending up as visible text.

Might there a setting somewhere that is stripping the script from the question source? I'm not our instance admin, so I can't check myself. (Adding a script is even suggested in the official docs , so I conclude that this should work fine.)

Many thanks for any pointers!

Please Log in to join the conversation.

  • keunes
  • keunes's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 9 months ago #230806 by keunes
Replied by keunes on topic Script gets removed from question source
Just found that there's a setting for this :) Problem (hopefully) solved.

help.limesurvey.org/portal/en/kb/article...description#Security

Please Log in to join the conversation.

More
1 year 9 months ago #230809 by jelo
Replied by jelo on topic Script gets removed from question source
You're correct. That setting (Filter HTML for XSS) will fix your issue.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: keunes

Please Log in to join the conversation.

  • keunes
  • keunes's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 9 months ago #230869 by keunes
Replied by keunes on topic Script gets removed from question source
It did indeed :-)

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose