Welcome to the LimeSurvey Community Forum

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

Pass custom variables to the survey template

  • prajay04
  • prajay04's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago - 4 years 6 months ago #189589 by prajay04
Hello,

I am trying to display some extra values in my theme file.

These are some images and text content which will be different for each survey.

eg. {{ aSurveyInfo.additional_params.image_1 }}

How do i pass these variable so i can access them in my theme file. As per above eg. how can i pass additional_params to theme file without editing core file code

I am using LimeSurvey Version 3.17.17
Last edit: 4 years 6 months ago by prajay04.
The topic has been locked.
More
4 years 6 months ago #189631 by jelo
You can access ExpressionScript (ExpressionManager) variables inside TWIG templates via processString.
E.g.
Code:
{{ processString("{TOKEN}") }}

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: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #189670 by DenisChenu
Replied by DenisChenu on topic Pass custom variables to the survey template
Even in old system i use {QCODE.NAOK} in template …

Then you can use {{ processString("{QCODE.NAOK}") }} in 3.X theme.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose