Welcome to the LimeSurvey Community Forum

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

How to hide atributes that are not filled.

  • Serafim
  • Serafim's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 2 months ago #90661 by Serafim
Hello,

is it possible to hide atributes in a token that are not filled? So when I use that atribute in a question, in the tokens that that atribute is filled it will show, but in tokens that atribute is not filled it does not appear.

Sorry for my english...
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 2 months ago #90665 by tpartner
Replied by tpartner on topic How to hide atributes that are not filled.
With Expression Manager you can use an IF statement - docs.limesurvey.org/Expression+Manager&s...mplemented_Functions
Code:
{if(TOKEN:ATTRIBUTE_5, TOKEN:ATTRIBUTE_5, '')}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Serafim
  • Serafim's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 2 months ago #90675 by Serafim
Replied by Serafim on topic How to hide atributes that are not filled.
Thanks, I'm gonna try it.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 2 months ago #90678 by Mazi
Tony, did you test that syntax? Doesn't it just test if the token attribute exists instead of checking whether it contains any value?

Anyway, if the above example doesn't work, try this:
Code:
{if(!is_empty(TOKEN:ATTRIBUTE_5), TOKEN:ATTRIBUTE_5, '')}

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose