- Posts: 16
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I validate based on the previous answer?
- luayessa
- Topic Author
- Offline
- New Member
Less
More
11 years 2 weeks ago #93589
by luayessa
Can I validate based on the previous answer? was created by luayessa
I want to be validate the answer based on the answer of previous question.
For example:
Q1: How old are you?
Q2: How old are your son?
Now, the answer of Q2 should be lower than the answer of Q1.
How can I do this validation?
For example:
Q1: How old are you?
Q2: How old are your son?
Now, the answer of Q2 should be lower than the answer of Q1.
How can I do this validation?
The topic has been locked.
- luayessa
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 1
11 years 2 weeks ago #93601
by luayessa
Replied by luayessa on topic Can I validate based on the previous answer?
I got it.
You can check this tutorial page: docs.limesurvey.org/Expression+Manager+Sample+Surveys
If you are not patient, check this survey: docs.limesurvey.org/tiki-download_wiki_a...attId=115&download=y
You can check this tutorial page: docs.limesurvey.org/Expression+Manager+Sample+Surveys
If you are not patient, check this survey: docs.limesurvey.org/tiki-download_wiki_a...attId=115&download=y
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 2 weeks ago #93603
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Can I validate based on the previous answer?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- luayessa
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 1
11 years 2 weeks ago #93611
by luayessa
Replied by luayessa on topic Can I validate based on the previous answer?
Thank you for your answer, but as I know, the relevance equation helps to show or hide the question but not to validate the answer.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 2 weeks ago #93614
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Can I validate based on the previous answer?
OUps .... :blush: sorry.
Question validation equation .... in advanced settings of the question
Question validation equation .... in advanced settings of the question
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: luayessa
The topic has been locked.
- luayessa
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 1
11 years 2 weeks ago #93618
by luayessa
Replied by luayessa on topic Can I validate based on the previous answer?
Sorry, but the validation equation is a regular expression. Can we use a SGQA identifier in the regular expression?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
11 years 2 weeks ago #93619
by DenisChenu
You can use regular expression to with EM in "Question validation equation" : RegExp(blabla)
Not validation equation but "Question validation equation"
See docs.limesurvey.org/Expression+Manager#Validation and docs.limesurvey.org/Advanced+question+settings#em_validation_q
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Can I validate based on the previous answer?
To test, in a numeric question type, if Q1 < Q2, use it directly in advanced setting/Question validation equationluayessa wrote: Sorry, but the validation equation is a regular expression. Can we use a SGQA identifier in the regular expression?
You can use regular expression to with EM in "Question validation equation" : RegExp(blabla)
Not validation equation but "Question validation equation"
See docs.limesurvey.org/Expression+Manager#Validation and docs.limesurvey.org/Advanced+question+settings#em_validation_q
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: luayessa
The topic has been locked.