Get token in completed/submit.twig template

Mehr
8 Monate 2 Wochen her #180135 von 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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
8 Monate 2 Wochen her #180147 von DenisChenu
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
{{ 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 .
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: LouisGac

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180169 von webmasterlee
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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180172 von DenisChenu
Can you try in question.twig with {{ processString("{TOKEN:TOKEN}") }} ?

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180175 von webmasterlee
Version 3.15.6+190108

{{ processString("{TOKEN:TOKEN}") }} works for every page (including question.twig) except the last completed page.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180176 von jelo

DenisChenu schrieb: Can you try in question.twig with {{ processString("{TOKEN:TOKEN}") }} ?

Why did that change? Who has the real overview and can provide a uptodate variable sheet.
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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180184 von DenisChenu
TOKEN:TOKEN came from Expression Manager knowVars
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 .
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: LouisGac

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180186 von DenisChenu
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

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 .
An error happen ? Before make a new topic : remind the Debug mode .
Folgende Benutzer bedankten sich: webmasterlee

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180196 von webmasterlee
Thank you all. I upgraded to the latest version 3.15.8+190130 and both {{ processString("{TOKEN}") }} and {{ processString("{TOKEN:TOKEN}") }} work.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
8 Monate 2 Wochen her #180197 von DenisChenu
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 .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha