Welcome to the LimeSurvey Community Forum

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

"aSurveyInfo.languagecode" does not work in BootStrap Button answer.twig

  • OngJunYew
  • OngJunYew's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 10 months ago #201195 by OngJunYew
Can I know why "aSurveyInfo.languagecode" does not work in bootstrap button answer.twig ?

I want to write some if else statement same as like this but seem they cannot recognize the variables:


{% if aSurveyInfo.languagecode == 'en' %}
<div class = "boxes">
<div class = "leftbox">
<p class="ratingtext">Not likely</p>
</div>

<div class = "middlebox">
<p class="ratingtext">Neutral</p>
</div>

<div class = "rightbox">
<p class="ratingtext">Very likely</p>
</div>
</div>
{%else%}
<div class = "boxes">
<div class = "leftbox2">
<p class="ratingtext2">Tidak mengesyorkan</p>
</div>

<div class = "middlebox2">
<p class="ratingtext2">Neutral</p>
</div>

<div class = "rightbox2">
<p class="ratingtext2">Sangat mengesyorkan</p>
</div>
</div>
{%endif%}
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #201232 by tpartner
Try this:

Code:
{% if processString('{SURVEYLANGUAGE}') == 'en' %}

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, OngJunYew
The topic has been locked.
  • OngJunYew
  • OngJunYew's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 10 months ago #201319 by OngJunYew
Thanks its works
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #201336 by DenisChenu
Else :
14228: Survey and Question Theme need more information

theme need more information available …

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 following user(s) said Thank You: tpartner
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose