Sometimes you want to show certain questions of a survey to a specific user group only. With Limesurvey this is no problem. If your survey is set to be non-anonymous and uses tokens, you can use user defined attributes for conditions. Here we describe the necessary steps.
1. Adding additional attributes
Set the survey to be non-anonymous:
Enable tokens:
Add a certain number of user defined attribute fields:
Assign attribute names after having created the new fields:
Add some dummy tokens with user defined values
Set conditions for a certain question
Go to the question and call the condition designer:
Select the token field on which the condition should be based on (e. g. “Department”) and define the constant which the condition should match (e. g. “Management”):
Check condition
You can use the group preview for a first check if the condition was stored successfully,
because in this case the question will not be shown at the group preview (because the conditions isn’t met). The arrow indicates where the question was previously shown before setting the condition:
Test survey at runtime
Once tokens were assigned when adding users or by using the “Generate tokens” feature, the “Display tokens” screen contains an icon to test each token entry:
Of the above users, only “Jane” belongs to the department “Management”. Let’s check the different survey behavior to check if the condition works as expected:
More information
- Check out our survey creation services if you have trouble setting up the survey yourself.
- Limesurvey manual – Conditions
- Limesurvey manual – Tokens