How to limit the Date of birth to be at least 18 year ago

Hi,

I’ve built a form that asks people’s date of birth using date as the questions type, but it turned out that some would pick the day they fill out the form (or any other random day) to be their answer, I wonder if there is any way to add a condition/ constraint to limit people’s random choice so that they cannot put in answers that makes them less than 18 years old? Thank you very much!

Best,

Maybe you could try this out as outlined in the image below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: When a wrong entry is made

Data entry screen as seen in Enketo: When a correct entry is made

Reference xlsform:

Calculate Age.xlsx (9.7 KB)

1 Like

Is it possible to give any constraint on the year, when we give year as appearance in for Date of Birth?

Hi!
Yes, what kind of constraint do you want to do?

1 Like