How to Check Age and Set Dates from Today in Gravity Forms
Updated November 10, 2026 · 3 min read
Dates come up in almost every real form. Is this person under 18, so they need a waiver? Which age group does this camper belong in? When is this request due, two weeks from today? When does the membership renew?
Gravity Forms collects dates well, but working with them is another matter. This guide covers what’s built in, where it stops, and how to set up date rules without code.
What Gravity Forms can do on its own
- The Date field collects a date with a date picker, drop downs or separate boxes, in the format you choose.
- Calculations work with numbers: a Number field can add, subtract, multiply and divide other number fields. They don’t work out the days or years between dates.
- Conditional logic compares a field’s value with text or a number you type. It can’t compare a date with today’s date, so “show the waiver if they’re under 18” isn’t something it can decide.
That’s why searches like “Gravity Forms calculate age” and “conditional logic dates” are so common.
The code route
Developers usually add JavaScript that reads the date, works out the age in the browser, and fills a hidden field that conditional logic can use, then repeat the calculation in PHP so the saved entry is right. Date formats (is 04/06 April or June?) and time zones make this fiddly.
The no-code route: KodaFill date rules
KodaFill adds if/then rules to fields, and its rules understand dates. A condition can check whether a Date field is before or after a day worked out from today, like {today-18 years}. A rule can also fill a Date field with a date like {today+14}.

Example: flag under-18s
Add a Radio Buttons field called Age check with the choices Under 18 and 18 or over (or a Hidden field, if visitors don’t need to see it). Then, on its KodaFill tab:
- Tick Fill this field in automatically and keep Always fill it.
- Add a rule: Date of birth is after
{today-18 years}โ Under 18. - Set If no rule matches to 18 or over.
- Tick Visitors can’t change this field, so it can’t be changed by hand.
Someone born after the date 18 years ago is younger than 18. Now Age check is an ordinary field, so Gravity Forms’ conditional logic can use it: show a parent’s consent section, add a waiver checkbox, or route the notification.
Pair it with KodaClip to attach the waiver PDF only to under-18 registrations. See adding attachments to notifications.
Example: age groups
Rules run top to bottom and the first match wins, so age groups are just rules in order. On a Drop Down called Group:
- Date of birth is after
{today-9 years}โ Minnows - Date of birth is after
{today-12 years}โ Otters - Date of birth is after
{today-15 years}โ Orcas - If no rule matches โ Leaders
The youngest group comes first, because someone who is 7 is also “after” the 12-years-ago date.
Example: a due date from today
On a Date field called Due date, set If no rule matches to {today+14}, and add a rule Options is Rush โ {today+3}. KodaFill writes the date in the field’s own format.
You can count in days, weeks, months or years: {today+2 weeks}, {today+1 month}, {today-1 year}. Months land on the same day of the month, or the last day when the month is shorter.
Which “today”?
While the form is open, “today” is the date on the visitor’s device, so the page responds instantly. When the form is submitted, KodaFill works everything out again using your site’s time zone, and that’s the value saved in the entry. Values are only recalculated if the entry is edited later, so a saved priority or age group doesn’t drift as time passes.
What KodaFill doesn’t do
KodaFill sorts and fills by date; it doesn’t calculate an exact age as a number, or the number of days between two dates. If you need “Age: 34” as a number, that still needs a calculation add-on or a little code.
Which route should you take?
- You just need to collect a date: Gravity Forms’ Date field is all you need.
- You need age checks, age groups, due dates or renewal dates that fill in and save correctly: use KodaFill rules.
Try date rules on the live camp registration on the KodaFill page, or see Date conditions in the docs.
