- Posts: 18
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
connecting surveys
- uba
- Topic Author
- Offline
- New Member
Less
More
10 years 2 months ago #105656
by uba
connecting surveys was created by uba
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.
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.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
10 years 2 months ago #105658
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on 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.
"...&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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The following user(s) said Thank You: uba
The topic has been locked.
- uba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 1
10 years 2 months ago #105664
by uba
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.
Replied by uba on 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.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10114
- Thank you received: 3595
10 years 2 months ago #105665
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
10 years 2 months ago #105666
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic connecting surveys
Try replacing "...&usertoken..." with "...?usertoken..."
The first passed URL parameter always needs to use "?".
The first passed URL parameter always needs to use "?".
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The following user(s) said Thank You: uba
The topic has been locked.
- uba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 1
10 years 2 months ago #105693
by uba
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.
Replied by uba on 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.
The topic has been locked.
- uba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 1
10 years 2 months ago #105694
by uba
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.
Replied by uba on 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.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10114
- Thank you received: 3595
10 years 2 months ago - 10 years 2 months ago #105704
by tpartner
Place images in your array sub-questions and then, in template.js, change both instances of this:
To this:
Here is a working template and survey.
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic connecting surveys
The IAT workaround will work with images if you make one small change....apparently it isn't possible to use images in the Limesurvey version...
Place images in your array sub-questions and then, in template.js, change both instances of this:
Code:
$('div.iatWord', thisQuestion).text($('.subquestion-list.unanswered:first .answertext', thisQuestion).text());
To this:
Code:
$('div.iatWord', thisQuestion).html($('.subquestion-list.unanswered:first .answertext', thisQuestion).html());
Here is a working template and survey.
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 10 years 2 months ago by tpartner.
The topic has been locked.
- uba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 1
10 years 2 months ago #105729
by uba
Replied by uba on topic connecting surveys
Thanks very much, I'll try it out!
The topic has been locked.