Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: Random assignment to conditions

Random assignment to conditions 8 Monate 3 Wochen her #104175

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4270
  • Dank erhalten: 804
  • Karma: 368
Yes, that's why I used JavaScript.

.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Random assignment to conditions 6 Monate 2 Wochen her #107099

  • zboy
  • zboys Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 9
  • Karma: 0
Hi guys,

I would like to use the code posted on the first page but I can't get it working. Do I need to change anything in it like the qID or something like that?

Thanks.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Random assignment to conditions 4 Monate 2 Wochen her #109707

  • fiona92
  • fiona92s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 2
  • Karma: 0
tpartner schrieb:
Well, you can use the {SUBMITID} variable (which is available AFTER the first page submission) and the JavaScript modulus operator to load a hidden short-text question with sequential numbers between 1 and 4.

Note though, that the sequential number will increment with every respondent, even those who don't complete the survey.

Add this script to the source of a short-text question:
<script type="text/javascript" charset="utf-8">	
 
	$(document).ready(function() { 
 
		var submitID = {SAVEDID};
 
 		// Hide this question
		$('#question'+qID).hide();
 
		// Find sequential number between 1 and 4 based on the SUBMITID
		var conditionNumber = (submitID % 4) + 1;
 
 		// Load the hidden question
		$('#question'+qID+' input.text').val(conditionNumber);
	});
</script>

.

I don't know where to fill in this script?
After the first page submission.... So after the first question is filled in, by the second question fill in this script? Of by the first question, after the page with welcome and intructions? And how do i make the different questionaires for the three groups?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Random assignment to conditions 4 Monate 2 Wochen her #109735

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4270
  • Dank erhalten: 804
  • Karma: 368
After the first page submission.... So after the first question is filled in, by the second question fill in this script?
Place the script in the source of a short-text question on a page AFTER the first QUESTION PAGE has been submitted.



And how do i make the different questionaires for the three groups?
See conditions or relevance - manual.limesurvey.org/Setting_conditions.


.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Letzte Änderung: 4 Monate 2 Wochen her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.138 Sekunden
Donation Image