- Posts: 11
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Having multiple surveys presented at random from one link
- liamcal
- Topic Author
- Offline
- New Member
Less
More
3 years 7 months ago #204736
by liamcal
Having multiple surveys presented at random from one link was created by liamcal
Hello!
I have 3 different surveys I wish to distribute evenly, however I want to do so using the one link that randomly distributes my 3 survey to respondents.
I found this old topic on the forums where someone had the exact same query as myself:
forums.limesurvey.org/forum/can-i-do-thi...random-from-one-link
I am not sure where to enter the script that is mentioned in this forum and how to implement the recommendation.
I also found this in the manual:
I am not sure how to Create a new directory in my server. I am wondering if I need to upgrade from LimeSurvey Basic to LimeSurvey Expert to do this.
Any help would be greatly appreciated and thank you in advance!
Liam
I have 3 different surveys I wish to distribute evenly, however I want to do so using the one link that randomly distributes my 3 survey to respondents.
I found this old topic on the forums where someone had the exact same query as myself:
forums.limesurvey.org/forum/can-i-do-thi...random-from-one-link
I am not sure where to enter the script that is mentioned in this forum and how to implement the recommendation.
I also found this in the manual:
I am not sure how to Create a new directory in my server. I am wondering if I need to upgrade from LimeSurvey Basic to LimeSurvey Expert to do this.
Any help would be greatly appreciated and thank you in advance!
Liam
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 7 months ago #204738
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 Having multiple surveys presented at random from one link
Both of those solutions require that you create a remote (outside of LimeSurvey) PHP file and place it on a web server. You will need a little PHP/HTML skill and access to the server.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 7 months ago #204739
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 Having multiple surveys presented at random from one link
Another solution would be to create a "redirection" survey and direct to one of the three surveys via End URL.
You can use Expression Manager to tailor the End URL based on a hidden equation question that generates a random number 1-3.
You can use Expression Manager to tailor the End URL based on a hidden equation question that generates a random number 1-3.
Code:
https://example.com/index.php?r=survey/index&sid={if(random == 1, 111111, if(random == 2, 222222, 333333))}
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: DenisChenu
The topic has been locked.
- liamcal
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
3 years 7 months ago - 3 years 7 months ago #204825
by liamcal
Replied by liamcal on topic Having multiple surveys presented at random from one link
Hi tpartner,
In regards to your second suggestion, are you saying to create a new survey that has no contents, its URL will be the one you have provided and its sole purpose will be to redirect participants to my three surveys?
In regards to the URL you have provided, for this section: (random == 1, 111111, if(random == 2, 222222, 333333))}
for the 111111, 222222, 333333 etc, what text do I actually insert here? Is it the current URL's I have for each survey into that space?
Thank you
Liam
In regards to your second suggestion, are you saying to create a new survey that has no contents, its URL will be the one you have provided and its sole purpose will be to redirect participants to my three surveys?
In regards to the URL you have provided, for this section: (random == 1, 111111, if(random == 2, 222222, 333333))}
for the 111111, 222222, 333333 etc, what text do I actually insert here? Is it the current URL's I have for each survey into that space?
Thank you
Liam
Last edit: 3 years 7 months ago by liamcal.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
3 years 7 months ago #204835
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 Having multiple surveys presented at random from one link
You could hide all content in the "redirection" survey and use JavaScript to click "Submit" but it would be easier to provide some text content and have the respondent click through to the following survey.
The example URL I provided is the End URL in the "redirect" survey. The 111111, 222222, 333333 are the survey IDs of your following surveys.
The example URL I provided is the End URL in the "redirect" survey. The 111111, 222222, 333333 are the survey IDs of your following surveys.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.