- Posts: 36
- Thank you received: 2
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
- Topic Author
- Offline
- Junior Member
Less
More
3 years 10 months ago #201195
by OngJunYew
"aSurveyInfo.languagecode" does not work in BootStrap Button answer.twig was created 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%}
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
3 years 10 months ago #201232
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic "aSurveyInfo.languagecode" does not work in BootStrap Button answer.twig
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 2
3 years 10 months ago #201319
by OngJunYew
Replied by OngJunYew on topic "aSurveyInfo.languagecode" does not work in BootStrap Button answer.twig
Thanks its works
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
3 years 10 months ago #201336
by DenisChenu
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.
Replied by DenisChenu on topic "aSurveyInfo.languagecode" does not work in BootStrap Button answer.twig
Else :
14228: Survey and Question Theme need more information
theme need more information available …
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.