Welcome to the LimeSurvey Community Forum

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

How to edit template.js

  • BertrandP
  • BertrandP's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #204093 by BertrandP
How to edit template.js was created by BertrandP
Hi,

While browsing the forum, I found exactly what I wanted to do here : forums.limesurvey.org/forum/design-issue...oup-and-subquestions
However being a LimeSurvey beginner and not very comfortable with JavaScript, I don't know where to find or how to modify this template.js file.
Could you please help me? My version of LimeSurvey is 3.15.9+190214
Regards,
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #204095 by Joffm
Replied by Joffm on topic How to edit template.js
Hi,
you will not find it, because it is not existing anymore.
The snippet you found was for LimeSurvey version 2.05/2.06.
Since then the structure and the library changed totally.
Now this file is called custom.js

But you can do this easier.

In the question.twig. In your extended theme in theme editor

change these lines

{# Answers #}
{{ include('./subviews/survey/question_subviews/answers.twig') }}

{# Survey question Help #}
{{ include('./subviews/survey/question_subviews/survey_question_help.twig') }}

to
{# Survey question Help #}
{{ include('./subviews/survey/question_subviews/survey_question_help.twig') }}

{# Answers #}
{{ include('./subviews/survey/question_subviews/answers.twig') }}



Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • BertrandP
  • BertrandP's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #204096 by BertrandP
Replied by BertrandP on topic How to edit template.js
It worked perfectly. Thank you very much!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose