Set default value for date field to today

I’m trying to set the default value for a date field to the date the form is rendered (i.e., today).

I see that adding the field {date_mdy} or {date_dmy} can add the full date if I’m using the Datepicker, but I cannot use the DatePicker for accessibility compliance reasons.

I’ve verified that I can default the month to the current month by pasting {date_mdy} into the month field, & default the day of month to the current date by pasting {date_dmy} into the Day field. However I haven’t been able to reverse-engineer a value that will give me the current year in the year field.

I’ve seen the documentation on merge tags for the date field here:

…but that doesn’t give me anything I can use for this.

Today [https://docs.gravityforms.com/today-merge-tags/] doesn’t seem to be what I’m looking for, since it requires setting the WordPress date format differently to get numeric values, & that’s not really very helpful in the scenario of adding dates to numeric date fields.

Can anyone help or point me to resources?

You’re on the right track. That recently-introduced {today} Merge Tag you link can be used for the this. Assign the following default values for each respective input:

{today:format:m}
{today:format:d}
{today:format:Y}
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.