insert custom javascript file with new template system

More
1 month 1 week ago #175028 by michaelziv
michaelziv created the topic: insert custom javascript file with new template system
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!

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #175029 by LouisGac
LouisGac replied the topic: insert custom javascript file with new template system
I suggest you read this article first:

manual.limesurvey.org/New_Template_System_in_LS3.x

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #175030 by michaelziv
michaelziv replied the topic: insert custom javascript file with new template system
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?

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #175031 by LouisGac
LouisGac replied the topic: insert custom javascript file with new template system
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

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #175036 by michaelziv
michaelziv replied the topic: insert custom javascript file with new template system
After reset everything works fine.
Thank you for your support
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!