Welcome to the LimeSurvey Community Forum

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

Token attributes in PDF response

  • oledole
  • oledole's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 5 months ago #190000 by oledole
Token attributes in PDF response was created by oledole
Hi.

I've a survey that uses token for participants. In the survey there are questions containing text such as {TOKEN:FIRSTNAME} and {TOKEN:LASTNAME}. Now this does it job excatly as one would suspect, with those placeholders being replaced by the participants first name and last name.

However when you export a response of the survey as PDF the question text for each response contains {TOKEN:FIRSTNAME} instead of the first name of the participant that made the response. This doesn't look good and makes it hard to know who's answer one is looking at.

I've tried exporting the answer with the remotecontroll API too but it has the same issue. I get the PDF but the questions contain {TOKEN:LASTNAME} instead of the actual last name etc.

This happens even in any survey I've made that use {TOKEN:FIRSTNAME} and such in the question text.

Is there a way to make the placeholders be replaced in the PDF export aswell?
The topic has been locked.
More
4 years 5 months ago #190017 by jelo
Replied by jelo on topic Token attributes in PDF response
This works as intended. The question text will show the variables, not the content. That is because the questiontext is unrelated to the individual response.

If you want to the save the content of e.g. {TOKEN:FIRSTNAME} inside a response set, you will need to create e.g. a equation question and place the variable inside the question. Or add a question with default value options, where you place {TOKEN:FIRSTNAME} as the default answer. These questions can be hidden.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose