- Posts: 12
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Do not allow answers based on previous answers
- andogro
- Topic Author
- Offline
- New Member
Less
More
9 years 8 months ago #111741
by andogro
Do not allow answers based on previous answers was created by andogro
Hello
I am creating a survey where some questions have answers that should not be allowed based on previous ones. For example:
A. How many close friends do you have
1. 0
2. 1
3. 2
4. 3-5
5. 6-10
6. More than 10
B. How many are female?
1. 0
2. 1
3. 2
4. 3-5
5. 6-10
6. More than 10
For Question B, I need to not allow the answer to be higher than the previous question. Is there an easy way to do this with conditions?
Thanks
Andy
I am creating a survey where some questions have answers that should not be allowed based on previous ones. For example:
A. How many close friends do you have
1. 0
2. 1
3. 2
4. 3-5
5. 6-10
6. More than 10
B. How many are female?
1. 0
2. 1
3. 2
4. 3-5
5. 6-10
6. More than 10
For Question B, I need to not allow the answer to be higher than the previous question. Is there an easy way to do this with conditions?
Thanks
Andy
The topic has been locked.
- first
- Offline
- Elite Member
Less
More
- Posts: 227
- Thank you received: 36
9 years 8 months ago #111743
by first
Survey Designer and Programmer
Replied by first on topic Do not allow answers based on previous answers
This can be done question validation equation in question settings. Something like below.
B.NAOK <= A.NAOK
B.NAOK <= A.NAOK
Survey Designer and Programmer
The topic has been locked.
- andogro
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
9 years 8 months ago - 9 years 8 months ago #111745
by andogro
Replied by andogro on topic Do not allow answers based on previous answers
Thank you for the response - I'm glad to know it can be done. Can you give me a more specific example of what the code might look like? I see the relevance equation area for the question and already have some conditions set there, but am wondering how I would code.
In a similar vein, I have other questions that are type in answers - for example "How old were you the first time you smoked cigarettes" and the second question is "How old were you when you started smoking a pack a day". The second question must be equal or greater than the first.
In a similar vein, I have other questions that are type in answers - for example "How old were you the first time you smoked cigarettes" and the second question is "How old were you when you started smoking a pack a day". The second question must be equal or greater than the first.
Last edit: 9 years 8 months ago by andogro. Reason: needed to add more
The topic has been locked.