Welcome to the LimeSurvey Community Forum

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

tailored question text

  • FranzGerbig
  • FranzGerbig's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 3 days ago #167559 by FranzGerbig
tailored question text was created by FranzGerbig
Hi guys,

I'm trying and struggling with a question text, I want to be tailored depending on a prior answer.
Therefore, I put sth like the following in the question text area:
Code:
if((actual_1 == 1 and actual_2 == 1), "Would you?", "Would you, please?")
What's wrong about that? No brackets, comma or quote missing, but it doesn't convert into highlighted syntax.

thx in advance again

using LS 3.13.2+180709
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 days ago #167561 by tpartner
Replied by tpartner on topic tailored question text
You don't need brackets around the condition:

Code:
{if(actual_1 == 1 AND actual_2 == 1, "Would you?", "Would you, please?")}

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: FranzGerbig
The topic has been locked.
  • FranzGerbig
  • FranzGerbig's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 3 days ago #167570 by FranzGerbig
Replied by FranzGerbig on topic tailored question text
Aah, I forgot LS needs the curly braces to understand the text has to be tailored, though those braces don't show up in the logic file(s). :laugh:

using LS 3.13.2+180709
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose