Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Change question mix for different subsets of the overall survey?

Change question mix for different subsets of the overall survey? 3 years 1 month ago #64387

  • stevek23
  • stevek23's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Can we divide our respondents into groups and give them different questions?

For instance... if we invite 2000 prospects and then get 500 responses..

..could we divide those 500 actual respondents into 5 groups and have each 100 participants get a somewhat different question set?

Ideally the initial questions at the top of survey would be same for all 5 groups of respondents.. but later questions would be different depending on which block of 100 they are in.

This might work easily if an auto increment ID could be assigned to each respondent.. ie each respondent gets a unique number .. the first 100 get Question set 1.. the next 100 get question set 2.. etc.. but its all part of the same survey for reporting purposes..

Thanks much! Steve
Last Edit: 3 years 1 month ago by stevek23. Reason: typo
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64388

  • atiut
  • atiut's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 76
  • Thank you received: 2
  • Karma: 1
Use token attributes to register the variations for each token, and then send invitations to unique IDs. Then insert the attribute field in your question text.

A token attribute field can store a word, a phrase, a Youtube ID (tested!) or an image URL(not tested!).

If you have an anonymous survey or public registration, you will likely need to program 4 surveys and imagine some kind of redirect
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64389

  • stevek23
  • stevek23's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Thank you for the helpful answer. Token attributes could help a lot..

So I guess the real question is: how do we use ID and/or token attributes to divide respondents into equal sized groups after they respond?

If we divide users into question groups before we send invites.. the respondent groups may not be the same size..

Thanks
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64390

  • atiut
  • atiut's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 76
  • Thank you received: 2
  • Karma: 1
1. create an ID for each group in the attribute fields (say group1 to group4)

2. create a hidden question that will auto-fill with the group ID (look up the forum/documentation to see how it's done, i have never done it but others have)

3. set quotas to that question

you will not be able to re-direct from a full group to an empty group, but it is better than manual management.

Anyways, let me know how it works
Last Edit: 3 years 1 month ago by atiut.
The administrator has disabled public write access.
The following user(s) said Thank You: stevek23

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64411

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4210
  • Thank you received: 792
  • Karma: 360
Using JavaScript, you should be able to:

1) Get the "Response ID" using the {SAVEDID} placeholder (see - docs.limesurvey.org/The+template+editor&...+LimeSurvey#Keywords)

2) Do some math to see if it is evenly divisible by 2, 3, 4 or 5

3) Load the result into a hidden question

4) Display the appropriate follow-up questions using 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.
Last Edit: 3 years 1 month ago by tpartner.
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64438

  • stevek23
  • stevek23's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
@tpartner.. thanks for the excellent thinking.. this would allow us to rotate question groups for each new respondent sequentially with simple math..

but when I go to the page you referenced, I don't see Response or Save ID tokens or variables.... please advise

Steve
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64449

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4210
  • Thank you received: 792
  • Karma: 360
Oh, I guess that placeholder isn't listed there.

{SAVEDID} will return the "Response ID" from the database providing:
- The survey is active
- At least one question page has been submitted

So, if you want to load your "respondent group number" into a text question and then hide it for use with conditions you could:

1) Set up your survey to use JavaScript.

2) Create your text question in at least the second page of the survey (don't hide it with advanced settings - we'll do it with JavaScript). If you need the hidden question on the first page of questions, you can move your welcome message to a text-display question in the first page (group) and then use survey properties to skip the welcome screen. This effectively turns page 1 of questions into page 2 of the survey.

3) Add the following script to the source of the hidden question. Replace "QQ" with the hidden question ID.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		var qHiddenID = QQ;
		var savedID = '{SAVEDID}';
 
		// Hide the hidden question
		$('#question'+qHiddenID+'').hide();
 
		// Generate a "group number" from the savedID
		var group = (savedID % 5);
		if(group == 0) {
			group = 5;
		}
 
		// Load the hidden question
		$('#question'+qHiddenID+' input.text').val(group);
 
	});
 
</script>
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.
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64453

  • atiut
  • atiut's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 76
  • Thank you received: 2
  • Karma: 1
OFFTOPIC: Hmm, are there other placeholders that are not listed? And, om a different note, can we create our own placeholders in the configuration files....?
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64455

  • stevek23
  • stevek23's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
we have been making good progress with this code..

one quick follow up question: what's the best way to hide a whole question group with the same response ID approach ?

ie.. in this case we would have several question groups to rotate through..

thanks much
The administrator has disabled public write access.

Re: Change question mix for different subsets of the overall survey? 3 years 1 month ago #64484

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4210
  • Thank you received: 792
  • Karma: 360
Hmm, are there other placeholders that are not listed?
This placeholder is actually listed as a Token Email Placeholder. I found it also works in the survey while developing another workaround. I'll update the wiki when I get a chance.
And, om a different note, can we create our own placeholders in the configuration files....?
No but TMSWhite is introducing the Expression Manager Module (hopefully in v1.92) which may suit your needs.
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.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.139 seconds
Donation Image