Welcome to the LimeSurvey Community Forum

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

insert custom javascript file with new template system

  • michaelziv
  • michaelziv's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175028 by michaelziv
Hey there,

I'm trying to port an old survey of ours to limesurvey 3. We used a jquery library called autocomplete.
Where in the new template editor do I insert my JavaScript/jquery libraries?
I found an article saying to add it to "config.xml", but I can't find the xml file.

Thanks in advance!
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 5 months ago #175029 by LouisGac
I suggest you read this article first:

manual.limesurvey.org/New_Template_System_in_LS3.x
The topic has been locked.
  • michaelziv
  • michaelziv's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175030 by michaelziv
I added the line <add>files/jquery.csv-0.71.min.js</add> to upload/themes/survey/my_template/config.xml
The script isn't loaded and the xml file states that it's only used, when debug mode is enabled.

Is this the correct place to add custom js files?
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 5 months ago #175031 by LouisGac
as said in the article, you must reset the theme or turn on force_xmlsettings_for_survey_rendering.
the XML is pushed to the DB when installing a theme. So if you change the XML, you must refresh the DB
The topic has been locked.
  • michaelziv
  • michaelziv's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175036 by michaelziv
After reset everything works fine.
Thank you for your support
The following user(s) said Thank You: LouisGac
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose