No token in URL after submission is rejected

Mehr
1 Monat 3 Wochen her #188153 von LarryMartell
If I bring up a survey the token is in the URL. If I then submit the survey, but have not answered all the mandatory questions the survey is properly rejected. But when the page is redrawn the token is not in the URL. Is that a bug or is it expected? I need the token in some custom JS code I have.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
1 Monat 3 Wochen her #188156 von jelo
The URL is not carrying any parameter during the survey. It's a cookie session.

You already have that thread here.
www.limesurvey.org/forum/installation-a-...oken-from-javascript

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
1 Monat 3 Wochen her #188158 von LarryMartell
Yes, that thread was about getting the token, which I am doing - I get it from the URL. But now when it's not in the URL I cannot get it.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 3 Wochen her #188159 von jelo

LarryMartell schrieb: Yes, that thread was about getting the token, which I am doing - I get it from the URL.

Which only works on the first screen.

In that thread you wrote:

Ah, the token is in the URL and I can get that in the JS.


And Tpartner answered:

That will probably only work on the first screen or if using AJAX mode (which I advise against).


You still can open a bug report.

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
1 Monat 2 Wochen her #188168 von DenisChenu
It's the needed behaviour …

To get the token in a script
<script>
var userToken = '{TOKEN}'
</script>
in custom_header.twig for template or in question text (or anything else).

Then you can use it in any script …

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
1 Monat 2 Wochen her #188174 von LarryMartell
That was the first thing I had tried. It is not defined. Placeholders are not available in the custom.js file

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 2 Wochen her - 1 Monat 2 Wochen her #188178 von tpartner
I agree with Denis. I don't think it's a bug but is expected behaviour.

As long as the survey is not anonymous, the {TOKEN} placeholder will be available in scripts in question text, group description text or in some theme twig files.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Letzte Änderung: 1 Monat 2 Wochen her von tpartner.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 2 Wochen her #188188 von DenisChenu

LarryMartell schrieb: That was the first thing I had tried. It is not defined. Placeholders are not available in the custom.js file

Can you read again my comment ?

in custom_header.twig for template or in question text (or anything else).


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
1 Monat 2 Wochen her #188192 von LarryMartell
Where would I find the custom_header.twig file?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 2 Wochen her #188197 von tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 2 Wochen her #188199 von LarryMartell
We are running 2.73.1

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 2 Wochen her #188204 von DenisChenu

LarryMartell schrieb: We are running 2.73.1



Maybe best is to tell us at start …

head tag is in startpage.pstpl

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
1 Monat 2 Wochen her #188205 von tpartner
In that case, go to Configuration --> Template editor --> Your Template and try placing it in startpage.pstpl.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: LarryMartell

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
1 Monat 2 Wochen her #188218 von LarryMartell
Thank you so much. This is just what I needed.

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