Keywords on template

More
1 month 2 weeks ago #221012 by hribeiro
Hi all,

I was planning echoing into save template the firstname of a user using the token. Is this possible on the 3.27 version? I've read a note saying this was deprecated but was unable to find the new method.

Thanks in advance

Please Log in to join the conversation.

More
1 month 2 weeks ago #221013 by holch
Replied by holch on topic Keywords on template
So you want to show the first name of the respondent in the survey, based on the name of the respondent's name saved in the token table? This is easily possible.

Now if you want to show it within the template, not within the survey (e.g. the welcome text or a question text), then I don't know.

Where did you read this note? This is always an important information to understand where you are coming from.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
1 month 2 weeks ago #221015 by DenisChenu
Replied by DenisChenu on topic Keywords on template
In github.com/LimeSurvey/LimeSurvey/blob/ma...ws/content/save.twig

You can use processString function.
{{ procressString("{TOKEN:FIRSTNAME}") }}

for example.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The following user(s) said Thank You: tpartner

Please Log in to join the conversation.

More
1 month 2 weeks ago #221039 by hribeiro
Replied by hribeiro on topic Keywords on template
That's it! Perfect. Thank you Denis

Just a note for anyone who will copy paste: there's a typo so {{ processString("{TOKEN:FIRSTNAME}") }}
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now