Use {SURVEYURL} in TWIG Theme Limesurvey 3.15

More
1 week 4 days ago #177732 by Heinrich
Heinrich created the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
Hello,

I'm running Limesurvey 3.15 and would like to set up a token based survey including open registration.

When participants register they type in their name + emai laddress and then get redirected to a page where their name + email address is displayed + a short message that they will receive an email soon with the link to the survey.
I already found out how to change that short message. However, what I would like to add is the link to the survey which is sent out via email such that participants can click on the link to directly answer the survey.
In Limesurvey 2.7 I think that was possible using the placeholder {SURVEURYL}. In LS 3.15 with TWIG files, I think that using that term is not possible anymore. What I could already include was the name of the survey or the name of the admin of the survey. Yet, I did not find a possibility yet to include the token based link.

Any help is highly appreciated.

Thank you.

Please Log in or Create an account to join the conversation.

More
1 week 4 days ago #177738 by holch
holch replied the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
I am not sure, but because of the logic I don't think it was ever possible. Because {surveyurl} does not contain the token, as far as I know. But if it is a token based survey, you need the token to be able to enter the survey.

I might be mistaken though.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
1 week 4 days ago #177739 by holch
holch replied the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
In any way, if someone can participate without receiving the email, what is the point of the registration? You could just type any email and still would be able to participate. If that is what you want, you could just include 3 questions at the beginning of the survey that ask for name, lastname and email, couldn't you?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
1 week 4 days ago #177740 by Heinrich
Heinrich replied the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
Thank you for your Response. As far as I know, surveyurl does include the token.

We still need the Registration form because participants can then come back later and proceed the survey, made possible by the token.

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago #177742 by tpartner
tpartner replied the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
You can place this at the end of your twig file to see what survey info values are available:

{{ dump(aSurveyInfo) }}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Heinrich

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago #177745 by Heinrich
Heinrich replied the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
Thank you. I included that code, however, nothing is shown on the registration page. I also cleared the asset cache, but still no luck.
Anyways, I found the answer based on this post here: www.limesurvey.org/es/comunidad/foros/in...ions-from-2-x-to-3-x
The code is: {{ processString('{SURVEYURL}') }}

Will that still be working in LS 4.x?

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago #177747 by Heinrich
Heinrich replied the topic: Use {SURVEYURL} in TWIG Theme Limesurvey 3.15
Just a quick extension: With {{SURVEYURL}} no self-generated links with the "<a>" tag of HTML can be generated. That is why @@SURVEYURL@@ exists which only creates the link but without the "<a>" tag. However, @@SURVEYURL@@ does not work with TWIG files.

Therefore, I've created a workaround. The result looks like this:

<a href="https://URL-OF-YOUR-DOMAIN/index.php/{{ processString(aSurveyInfo.sid) }}/lang/LANGUAGE-OF-YOUR-STUDY-SUCH-AS-DE OR EN/token/{{ processString('{TOKEN}') }}">Please click here to be redirected to the survey</a>

With {{ processString(aSurveyInfo.sid) }} the SID of the survey is processed and with {{ processString('{TOKEN}') }} the token of the participant is processed. When clicking on the link he/she will be immediately redirected to the survey.


Besides that workaround: Is there any equivalent of SURVEYURL in TWIG? Again, I was not able to process the dump-command. This did not give me any results - neither did it give me any error.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!