- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Get token in completed/submit.twig template
- webmasterlee
- Topic Author
- Offline
- New Member
Less
More
5 years 2 months ago #180135
by webmasterlee
Get token in completed/submit.twig template was created by webmasterlee
Hi,
We just upgraded from Lime 2.67.1 to 3.15.6. We display a form on the completed page of the template which submits to another domain and passes the token in the form.
Previously we simply added {token} to the form but this no longer works with the new system. I've searched the manual and forum but could not find a way to output the token in the template. I'm sure I'm overlooking something simple.
Thoughts?
Thanks,
Alex
We just upgraded from Lime 2.67.1 to 3.15.6. We display a form on the completed page of the template which submits to another domain and passes the token in the form.
Previously we simply added {token} to the form but this no longer works with the new system. I've searched the manual and forum but could not find a way to output the token in the template. I'm sure I'm overlooking something simple.
Thoughts?
Thanks,
Alex
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 2 months ago #180147
by DenisChenu
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.
Replied by DenisChenu on topic Get token in completed/submit.twig template
All template are not Expression Managed now, it use twig.
In the twig file : you must use this function github.com/LimeSurvey/LimeSurvey/blob/ma...g_Extension.php#L429
In the twig file : you must use this function github.com/LimeSurvey/LimeSurvey/blob/ma...g_Extension.php#L429
Code:
{{ processString("{TOKEN}") }}
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 topic has been locked.
- webmasterlee
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 2 months ago #180169
by webmasterlee
Replied by webmasterlee on topic Get token in completed/submit.twig template
Thanks for your reply. It doesn't output anything in submit.twig. I tried putting it in layout_global.twig to test and it outputs the token on the first page of the survey only. Every other page it was empty.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 2 months ago #180172
by DenisChenu
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.
Replied by DenisChenu on topic Get token in completed/submit.twig template
Can you try in question.twig with {{ processString("{TOKEN:TOKEN}") }} ?
What is your version number ? github.com/LimeSurvey/LimeSurvey/commit/...9dce52f005d2664f3dfb
What is your version number ? github.com/LimeSurvey/LimeSurvey/commit/...9dce52f005d2664f3dfb
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 topic has been locked.
- webmasterlee
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 2 months ago #180175
by webmasterlee
Replied by webmasterlee on topic Get token in completed/submit.twig template
Version 3.15.6+190108
{{ processString("{TOKEN:TOKEN}") }} works for every page (including question.twig) except the last completed page.
{{ processString("{TOKEN:TOKEN}") }} works for every page (including question.twig) except the last completed page.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 2 months ago #180176
by jelo
If TOKEN is now TOKEN:TOKEN, what is the correct syntax to access a token attribute.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Get token in completed/submit.twig template
Why did that change? Who has the real overview and can provide a uptodate variable sheet.DenisChenu wrote: Can you try in question.twig with {{ processString("{TOKEN:TOKEN}") }} ?
If TOKEN is now TOKEN:TOKEN, what is the correct syntax to access a token attribute.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 2 months ago #180184
by DenisChenu
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.
Replied by DenisChenu on topic Get token in completed/submit.twig template
TOKEN:TOKEN came from expression manager knowVars
TOKEN come from template replace static vars
TOKEN come from template replace static vars
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 topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 2 months ago #180186
by DenisChenu
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.
Replied by DenisChenu on topic Get token in completed/submit.twig template
For last completed page : update to 3.15.7 or up.
For TOKEN : i update the close the original issue and create a new one
For TOKEN : i update the close the original issue and create a new one
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: webmasterlee
The topic has been locked.
- webmasterlee
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 2 months ago #180196
by webmasterlee
Replied by webmasterlee on topic Get token in completed/submit.twig template
Thank you all. I upgraded to the latest version 3.15.8+190130 and both {{ processString("{TOKEN}") }} and {{ processString("{TOKEN:TOKEN}") }} work.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 2 months ago #180197
by DenisChenu
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.
Replied by DenisChenu on topic Get token in completed/submit.twig template
Arg : i test for TOKEN : and it seem‘s it don't work in all twig :
bugs.limesurvey.org/view.php?id=14507
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 topic has been locked.