connecting surveys

More
3 years 6 months ago #105656 by uba
uba created the topic: connecting surveys
Hi,

I've set up a questionnaire, and after respondents complete the questionnaire, I will redirect them to a second questionnaire which is not a limesurvey questionnaire (it is javascript-based).

I'd like to pass respondents' token values from the limesurvey questionnaire to the second, non-limesurvey questionnaire, so that I can later merge the datasets. Anyone have any experience doing this?

Thanks.

Please Log in to join the conversation.

More
3 years 6 months ago #105658 by Mazi
Mazi replied the topic: connecting surveys
You can use the end URL feature to load the second survey. The token can be added to that URL using
"...&usertoken={TOKEN}..."

Limesurvey should automatically replace the placeholder with the current user's token so you can read that value from URL at the second survey.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: uba

Please Log in to join the conversation.

More
3 years 6 months ago #105664 by uba
uba replied the topic: connecting surveys

Mazi wrote: You can use the end URL feature to load the second survey. The token can be added to that URL using
"...&usertoken={TOKEN}..."

Limesurvey should automatically replace the placeholder with the current user's token so you can read that value from URL at the second survey.


I did this (added "&usertoken={TOKEN}" to the end of the end url) and the token was added to the url of the second survey's entry page, as such "...index.php&usertoken=xiqv5et

However this resulted in a 404 "page not found" error rather than the index.php showing up. Did I do something wrong, or perhaps neglect to do something obvious?

Thanks.

Please Log in to join the conversation.

More
3 years 6 months ago #105665 by tpartner
tpartner replied the topic: connecting surveys
If the "second questionnaire which is not a limesurvey questionnaire", we can't help you with accessing it.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 6 months ago #105666 by Mazi
Mazi replied the topic: connecting surveys
Try replacing "...&usertoken..." with "...?usertoken..."

The first passed URL parameter always needs to use "?".


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: uba

Please Log in to join the conversation.

More
3 years 6 months ago #105693 by uba
uba replied the topic: connecting surveys

tpartner wrote: If the "second questionnaire which is not a limesurvey questionnaire", we can't help you with accessing it.


I understand. Actually it is not really a questionnaire, but a javascript-based Implicit Association Test. Originally I wanted to use the Limesurvey workaround to implement it, but apparently it isn't possible to use images in the Limesurvey version, so I had to find an alternative.

Please Log in to join the conversation.

More
3 years 6 months ago #105694 by uba
uba replied the topic: connecting surveys

Mazi wrote: Try replacing "...&usertoken..." with "...?usertoken..."

The first passed URL parameter always needs to use "?".


This worked, thanks!! Now I just need to figure out how to pull the parameter from the URL to the second survey's dataset, which I realize isn't a Limesurvey issue.

Please Log in to join the conversation.

More
3 years 6 months ago - 3 years 6 months ago #105704 by tpartner
tpartner replied the topic: connecting surveys

...apparently it isn't possible to use images in the Limesurvey version...

The IAT workaround will work with images if you make one small change.

Place images in your array sub-questions and then, in template.js, change both instances of this:
$('div.iatWord', thisQuestion).text($('.subquestion-list.unanswered:first .answertext', thisQuestion).text());

To this:
$('div.iatWord', thisQuestion).html($('.subquestion-list.unanswered:first .answertext', thisQuestion).html());

Here is a working template and survey.

File Attachment:

File Name: Demo_IAT_C...ages.zip
File Size:76 KB

File Attachment:

File Name: limesurvey...2945.lss
File Size:18 KB




.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last Edit: 3 years 6 months ago by tpartner.

Please Log in to join the conversation.

More
3 years 6 months ago #105729 by uba
uba replied the topic: connecting surveys
Thanks very much, I'll try it out!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now