Pass on token to URL displayed in one of the survey questions

More
4 months 2 weeks ago #168263 by helveticar
helveticar created the topic: Pass on token to URL displayed in one of the survey questions
Hello,

I plan a survey that has, in the middle, a link to a website embedded which lets participants use a (personalized) tool. So basically I create participants, assign them a token and their specific survey URL with that token. Then after responding to a few demographic questions, I've added a question group with only a "text display" that has the link to the external tool. However, the link to that tool should include the token (this is because the tool is personalized for each participant, but also because I need to make sure I can track participant's survey responses and tool usage).

Is that possible? I tried to add the token into a URL ({INSERTANS:1234567890} ID thing) but it doesn't work; in fact, even in plain text the token isn't visible, and I'm not quite sure why not. Any help appreciated.

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

More
4 months 2 weeks ago #168265 by holch
holch replied the topic: Pass on token to URL displayed in one of the survey questions
What about {TOKEN:TOKEN}?

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
4 months 2 weeks ago - 4 months 2 weeks ago #168267 by helveticar
helveticar replied the topic: Pass on token to URL displayed in one of the survey questions
Oh wow, somehow I didn't know that existed. So now it works if I reference it in plain text. However, I'm not able to embed it into a clickable link; it seems like embedding a LimeSurvey reference into HTML just breaks it.

Edit: To clarify, "breaks it" means the URL gets changed from this (in source editor):

<a href=" domain.tld/{TOKEN:TOKEN}/ ">link</a>

to

{TOKEN:TOKEN}/">link
Last Edit: 4 months 2 weeks ago by helveticar.

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

More
4 months 2 weeks ago #168270 by holch
holch replied the topic: Pass on token to URL displayed in one of the survey questions
You probably have to mask the whole thing. EM code can't be directly in HTML code, I guess.

I think Tpartner gave an example once on how to do this.

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
4 months 2 weeks ago - 4 months 2 weeks ago #168271 by Joffm
Joffm replied the topic: Pass on token to URL displayed in one of the survey questions
Hi,
I just tested it with this entry:
<a href="http://www.mySite.de/phpinfo.php/{TOKEN:TOKEN}">link</a>

and it worked fine:
The link is:




So, you may revise your link.
Don't forget the "http(s)://"

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last Edit: 4 months 2 weeks ago by Joffm.

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

More
4 months 2 weeks ago #168289 by helveticar
helveticar replied the topic: Pass on token to URL displayed in one of the survey questions
Hm. Is this maybe a version issue? What version of Limesurvey are you using?

As soon as I hit "save" it removes everything before the TOKEN. See this brief video:

im.ezgif.com/tmp/ezgif-1-87e645b6fd.gif

@holch: Might be a plausible explanation, yes. How exactly do I "mask the whole thing" though? Mind you, I'm fairly new (or rather, coming back) to Limesurvey after 5+ years, so a bit rusty (and never really used advanced features).

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

More
4 months 2 weeks ago #168301 by Joffm
Joffm replied the topic: Pass on token to URL displayed in one of the survey questions
Hi,
I tested in 3.7.1 and 2.73.1

But what about the video?
You only provided a gif.
I only see a gif saying "404 image not found".

And you should show us the exact structure of your link.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

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

More
4 months 2 weeks ago - 4 months 2 weeks ago #168303 by helveticar
helveticar replied the topic: Pass on token to URL displayed in one of the survey questions
Meeeeeh, apparently the website I used quickly before I had to dash only stored the link for about 7.2 seconds or so. Here's a working link:

imgur.com/u68U1wR

I've tried lots of things, the link structure looks exactly like the one you posted earlier. I guess this might be another version error and I have to update, I'm on 3.7.0.
:(
Last Edit: 4 months 2 weeks ago by helveticar.

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

More
4 months 2 weeks ago - 4 months 2 weeks ago #168329 by holch
holch replied the topic: Pass on token to URL displayed in one of the survey questions
There should be no different behavior between your version (3.7.0) and Joffm's versions (3.7.1 and 2.73.1).

There are two things that come to mind, seeing your video:

1. Do you use the code / source view in the WYSIWYG-Editor to put the link?
2. Did you switch off the XSS filter? If the filter is on (default), Limesurvey filters a lot of HTML code.

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
Last Edit: 4 months 2 weeks ago by holch.
The following user(s) said Thank You: helveticar

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

More
4 months 2 weeks ago #168341 by helveticar
helveticar replied the topic: Pass on token to URL displayed in one of the survey questions
YES! It was the XSS filter. Thank you soooo much! Awesome! Now we can proceed, great :)

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!