Use the Date/Time field to collect a snapshot of the date and time a form was submitted or collect past or future dates.
Add the Date/Time field
In the form’s builder, drag and drop (or double-click) the Date/Time field from the Advanced Fields section:
Format the Date/Time field
Once you have added the field to the form, the field is populated with default formatting. Select the field to populate the field-specific settings to customize over on the left.
Tip - Did you know that you can save your field settings for use with other forms. Check out our saved fields article for more info.
Dropdown & Calendar View
This option lets you decide the visual style of your Date/Time Field. As an example, if this is a field where you're asking someone for their Date of birth, you may want to use the dropdown view option to make it easier to select the year.
Examples of how the Dropdown & Calendar views look on a form:
Date and time format
Update the appearance of the date and time field from the Date Format and Time Format dropdowns. Here you can change configurations from 12/31/18 to 31 Dec 2018 or 11:59:59 PM to 23:59.
Note: If you do not want to capture the date or time, select None from the drop-down menu.
Year selection parameters
From the current year, choose how far in the future, or past, to allow your end-users to pick from with a minimum of 0 to default as the current year.
For example, if you only want users to request information for the current year or the upcoming three years, change the defaults to:
Exclude past dates from being picked
In addition to being able to set the range of years that can be chosen, another option is to disable all dates from being able to be submitted after you select a day, month, and year. Once a date is set, no date after that one can be selected by the user and submitted without receiving an error. To enable this, select the calendar icon from the Disable Dates Past option:
To remove the set date, select the minus sign to clear the date:
Set a default date value
In the Default Value text box, you can pre-populate the field. Some examples to type here include:
| Example Default Values | Actions |
|---|---|
| Tomorrow | Will change the date/time field to tomorrow's date and current time. |
| Tomorrow 3pm | Will change the date/time field to tomorrow's date at 3 pm. |
| NOW | Will change the date/time field to the current date and time according to the timezone of the user's browser. |
| NOW + 15 | Will change the date/time filed to the current date and time + 15 minutes. |
| NOW - 15 | Will change the date/time field to the current date and time - 15 minutes. |
| NOW + 2 hours | Will change the date/time field to the current date and time + 2 hours ahead. |
| NOW - 2 hours | Will change the date/time field to the current date and time - 2 hours behind. |
| NOW + 3 days | Will change the date/time field to the current time + 3 days ahead. |
| NOW - 3 days | Will change the date/time field to the current time - 3 days behind. |
| NOW + 5 years | Will change the date/time field to the current month, day, and time + 5 years ahead. |
| NOW - 5 years | Will change the date/time field to the current month, day, and time - 5 years behind. |
You can also add or subtract weeks and seconds (in 5-second intervals) or write out an exact date and time.
Populate dates from calculations
Alternatively, you can populate a date/time field with calculations between multiple Formstack fields. Review the Date/Time Calculation article for an overview and use cases.