Welcome to the LimeSurvey Community Forum

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

How to validation two questions have same answer?

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 10 months ago #185442 by blocka
As a simplied example of what I need to do, I ask the question:

Q1: Please indicate your age [numeric input]:
Q2: Please re-enter your age to verify [numeric input}:

I don't want the user to be able to advance to Q3 if the answer to Q1 and Q2 are different.

I see there is the question validation field -- but I gather this only allows for regular expression comparisions, but I need to just confirm that Q1 = Q2.

How can I do this?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #185444 by Joffm
Hi, blocka,

but I gather this only allows for regular expression comparisions

What makes you think that?
Have a look at the demo surveys about this.

Your example:
(is_empty(Q2)) OR (Q1==Q2)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 10 months ago #185449 by blocka
Thanks! I tried that, and I've attached my sample survey where I've been trying to do this, and it doesn't work on build 3.17.5+190604
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 10 months ago #185455 by blocka
Ah, I see, this needs to be placed under the Logic tab for the question, like this:

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose