- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Pass on token to URL displayed in one of the survey questions
- helveticar
- Topic Author
- Offline
- New Member
Less
More
5 years 11 months ago #168263
by helveticar
Pass on token to URL displayed in one of the survey questions was created by helveticar
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.
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.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
5 years 11 months ago #168265
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Pass on token to URL displayed in one of the survey questions
What about {TOKEN:TOKEN}?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- helveticar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
5 years 11 months ago - 5 years 11 months ago #168267
by helveticar
Replied by helveticar on 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
to
{TOKEN:TOKEN}/">link
Edit: To clarify, "breaks it" means the URL gets changed from this (in source editor):
<a href=" domain.tld/{TOKEN:TOKEN}/ ">link
to
{TOKEN:TOKEN}/">link
Last edit: 5 years 11 months ago by helveticar.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
5 years 11 months ago #168270
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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 think Tpartner gave an example once on how to do this.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
5 years 11 months ago - 5 years 11 months ago #168271
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Pass on token to URL displayed in one of the survey questions
Hi,
I just tested it with this entry:
and it worked fine:
The link is:
So, you may revise your link.
Don't forget the "http(s)/"
Joffm
I just tested it with this entry:
Code:
<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: 5 years 11 months ago by Joffm.
The topic has been locked.
- helveticar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
5 years 11 months ago #168289
by helveticar
Replied by helveticar on 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).
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).
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
5 years 11 months ago #168301
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on 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
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
The topic has been locked.
- helveticar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
5 years 11 months ago - 5 years 11 months ago #168303
by helveticar
Replied by helveticar on 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.
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: 5 years 11 months ago by helveticar.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
5 years 11 months ago - 5 years 11 months ago #168329
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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.
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 5 years 11 months ago by holch.
The following user(s) said Thank You: helveticar
The topic has been locked.
- helveticar
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
5 years 11 months ago #168341
by helveticar
Replied by helveticar on 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
The topic has been locked.