JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
To calculate the age, you will be needing two date fields. One date field is where the date of birth is going to be entered and the other one is the one that will hold the current date or date today. You will also be needing a textbox field to display the output(age).
First, add the fields:
Then, set a default date(current) for the "Current Date" date field. You should also set the field to hidden.
After that, create a condition that says, "If the 'Date of Birth' date field is filled, calculate the age".
To calculate the Age, subtract the "Date of Birth" date field value from "Current Date" date field value. The difference will be in days, so you need to divide the value by 365.25 days to get the year(s).
You also need to get the value rounded down, that is why you will use the "floor()" math function. You need to do that so birthdays in November will not be counted as 1 if it's only August, for example.
Here's how it is done:
Here's a screenshot of the condition:
I would also suggest you disable future dates for the "Date of Birth" date field.
Here's a sample form: https://form.jotform.com/62380981430960
I hope this helps. If you need any further assistance, please contact us anytime. Thank you.