Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Validation equation

  • Zimone85
  • Zimone85's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 4 months ago #100927 by Zimone85
Validation equation was created by Zimone85
I have a question with two subquestions. The answer to these two sub-questions must be an exact numbers.

Suppose that the questions are:

Q001 How much is 2+2?

Q002 How much is 2+3?

I want participants not to be able to progress in the survey if they get at least one answer wrong.

I am writing in the Subquestion Validation Equation Q001 == "4" && Q002 == "5", but apparently it is not working.
Maybe I am getting the validation expression wrong?

Thanks in advance for your help
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 4 months ago #100948 by tpartner
Replied by tpartner on topic Validation equation
Try validating the whole question instead of sub-questions.

If your sub-question codes are Q001 and Q002, then this should work as a "Question validation equation"

Code:
self.sq_Q001 == 4 OR self.sq_Q002 == 5

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose