Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: randomly assign participants to groups

randomly assign participants to groups 3 years 4 weeks ago #101488

Hi Cecilia,
If you go to your question, you should include the code below in your source code (click source)
- This is for 4 conditions;
- you have to adjust the SurveyIdXGroupIdXQuestionId to correspond with your own Id-numbers (leave the X between the Id-numbers);
- and the last line $('#question1979503').hide(); is to hide the question with question Id number 1979503 -- you need to adjust this too to correspond with your question ID

Hope this helps!

Here's the code:

<script type="text/javascript">
// Find a random number between 1 and 4
var randNumber = Math.floor(Math.random()*4 + 1);
The administrator has disabled public write access.
Time to create page: 0.985 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form