Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Validation equation

Validation equation 3 years 7 hours ago #100927

  • Zimone85
  • Zimone85's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
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 administrator has disabled public write access.

Validation equation 2 years 11 months ago #100948

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6415
  • Thank you received: 1433
  • Karma: 558
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"

self.sq_Q001 == 4 OR self.sq_Q002 == 5
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
Time to create page: 0.249 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form