Welcome to the LimeSurvey Community Forum

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

How to set the values of variables defined in Twig templates

  • bjtilley
  • bjtilley's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 4 days ago - 3 weeks 4 days ago #259821 by bjtilley
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 6.4.5+240205 
Own server or LimeSurvey hosting: Yes
Survey theme/template: Vanilla register_message.twig
==================
I need to know how to set certain variables in found in the twig template.
For example register_message.twig has the following variables:
{{ aSurveyInfo.attr.registermessagea }}
{{ aSurveyInfo.attr.registermessageb }}

Do I set these values in the LimeSurvey admin backend?
Last edit: 3 weeks 4 days ago by bjtilley.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 4 days ago #259825 by tpartner
I believe those are from the locale translation files.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • bjtilley
  • bjtilley's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 4 days ago #259853 by bjtilley
Thanks for replying!

Would that be this file:
Code:
locale/_template/limesurvey.pot

And how would I make this message different per survey?

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 4 days ago #259862 by DenisChenu

Would that be this file:
Code:
locale/_template/limesurvey.pot
 
Best is to use DB for this
bugs.limesurvey.org/view.php?id=19283

And how would I make this message different per survey?
 

1. In survey theme {{ gT("Enter the access key") }}
2. In DB : source_message : id=1, message = 'Enter the access key'
3. in DB : message : id=1,language=fr, translation='Entrez le code d'accés'

The n you can create any number of string and use specific theme for this. No way (currently) to do it via Survey only.

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.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose