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
  • andogro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 8 months ago #111741 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
The topic has been locked.
More
9 years 8 months ago #111743 by first
This can be done question validation equation in question settings. Something like below.

B.NAOK <= A.NAOK

Survey Designer and Programmer
The topic has been locked.
  • andogro
  • andogro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 8 months ago - 9 years 8 months ago #111745 by andogro
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.
Last edit: 9 years 8 months ago by andogro. Reason: needed to add more
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose