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

  • sinandrei
  • sinandrei's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 2 months ago #102969 by sinandrei
Hello everyone,

My question would be if it were possible to have "multiple surveys presented at random from one link". So lets say I have 4 surveys and participant is presented one of those four at random.

I would be keen on using any workaround. Is the easiest thing to do to start all over, start with a randomly presented question and use logical branching from there one?

Thank you in advance,
Andrei
The topic has been locked.
More
10 years 2 months ago #102970 by supercosh
Hello Andrei

I would recommend writing a small PHP script which randomly redirects the user to one of your four surveys.

Then you would send your users the script url instead of the survey url. The script would look like that:
Code:
<?php
  $surveys = array (
    1 => 'www.example.com/?s=734567',
    2 => 'www.example.com/?s=734567',
    3 => 'www.example.com/?s=734567',
    4 => 'www.example.com/?s=734567'
  );
 
  $chosen = rand(1,4);
  header("Location: {$surveys[$rand]}");
?>

Regards
Gregor
The following user(s) said Thank You: DenisChenu, sinandrei
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose