-
valeriaanissinaAsked on August 11, 2019 at 5:59 AM
I want to limit submission to only 18 year old applicants. Since the days differ yearly I cannot use today-6570. Is there a more bulletproof way? So 18 years ago would always be the same date as today.
So if today is 11 august. then 18 years ago it would be 11 august as well, not 12 or 10 august
-
roneetReplied on August 11, 2019 at 6:13 AM
Please allow me some time to work on the workaround.
I'll get back to you in some time.
Thanks
-
roneetReplied on August 11, 2019 at 6:56 AM
Here is the Demo Form that you can check:
https://form.jotform.com/92222699859979
1. 1. First, have two Datetime field. The 1st one will get the current date while the other is for the date of birth.
2. Add a form calculation widget as the age field. We will do the calculation there.
3. In my form calculation widget, this is the formula I have.
floor((current date - date of birth) / 365 days)
floor - this will round your number value downward. You can check this link for the reference: http://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference
4. Add a condition to hide all the fields and show a text message if the age of the applicant is more than 18 years. This way the user would not be able to submit the Form.
Result:
I hope this workaround helps!
Thanks.
-
valeriaanissinaReplied on August 11, 2019 at 8:18 AM
Thank you so much for a quick reply. Unfortunately, it thinks 15th August 2001 is 18 years.
-
Mike_G JotForm SupportReplied on August 11, 2019 at 8:52 AM
I would like to inform you that the Date Picker field has "Age" option on its properties under the LIMITS tab that I think would suit your needs.
The Date Picker field will show an error message and the form will not submit if your respondent's birthday is under the Age set in the field.
I hope this helps. If you have other questions or concerns, please feel free to let us know.
-
valeriaanissinaReplied on August 11, 2019 at 8:57 AM
Love it! Thank you for showing me the date picker. So simple :)