- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to edit template.js
- BertrandP
- Topic Author
- Offline
- New Member
Less
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,
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
3 years 8 months ago #204095
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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') }}
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
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.