- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Using Survey Participants attributes in templates
- tanda7684
- Topic Author
- Offline
- New Member
Less
More
4 years 5 months ago #189879
by tanda7684
Using Survey Participants attributes in templates was created 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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
4 years 5 months ago #189886
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 Using Survey Participants attributes in templates
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
4 years 5 months ago #189917
by tanda7684
Replied by tanda7684 on topic Using Survey Participants attributes in templates
Thank you!
The topic has been locked.