Using Survey Participants attributes in templates

More
1 month 3 weeks 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.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 3 weeks ago #189886 by tpartner
You can use the processString() function in the theme twig files to access Expression Manager variables and token values.

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

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The following user(s) said Thank You: DenisChenu, tanda7684

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #189917 by tanda7684

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!