- Posts: 22
- Thank you received: 1
- Forum
- English support forums
- Can I do this with LimeSurvey?
- Can I validate based on the previous answer?
Can I validate based on the previous answer?
5 years 1 month ago #93589
by luayessa
luayessa created the topic: Can I validate based on the previous answer?
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?
Please Log in or Create an account to join the conversation.
5 years 1 month ago #93601
by luayessa
luayessa replied the 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
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 8885
- Karma: 400
- Thank you received: 1469
5 years 1 month 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Please Log in or Create an account to join the conversation.
5 years 1 month ago #93611
by luayessa
luayessa replied the 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.
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 8885
- Karma: 400
- Thank you received: 1469
5 years 1 month 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
DenisChenu replied the topic: Can I validate based on the previous answer?
OUps ....
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: luayessa
Please Log in or Create an account to join the conversation.
5 years 1 month ago #93618
by luayessa
luayessa replied the 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?
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 8885
- Karma: 400
- Thank you received: 1469
5 years 1 month 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: luayessa
Please Log in or Create an account to join the conversation.