Welcome to the LimeSurvey Community Forum

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

Using Survey Participants attributes in templates

  • tanda7684
  • tanda7684's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #189879 by tanda7684
How do you use survey participants' attributes in the web(not the email) templates? And how do you change the logo based on an attribute?

In my survey participants' table, I have extra attributes. The company's name, the website url, the url to the matching logo. I need to run the survey for two different companies. But the data needs to go into the same survey.

In the template I need to change the logo, it's alt tag, and the company name in the header and footer using the participant's attributes.

Also, how do you use the rest of the attributes such as their names?

I had it working with the 2.0 templates. But with the update to the twig templates, it no longer works.

I'm using version 3.19.1+191009

Thank you so much for your help.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #189886 by tpartner
You can use the processString() function in the theme twig files to access Expression Manager variables and token values.

Code:
{{ processString("{TOKEN:ATTRIBUTE_1}") }}

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, tanda7684
The topic has been locked.
  • tanda7684
  • tanda7684's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #189917 by tanda7684
Thank you!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose