Date Field

Written by the Divi Engine Documentation Team

Watch This Video

Introduction

Follow these steps to learn how to add a date field type to your form.

Step 1: Select Date Field

To use the Date field type select it from the Type dropdown in the main content settings of the Form Module.

Step 2: Define Date Format

Using the codes below, define the date format.

  • d : day of month (no leading zero)
  • dd : day of month (two digit)
  • o : day of year (no leading zeros)
  • oo : day of year (three digit)
  • D : day name short
  • DD : day name long
  • m : month of year (no leading zero)
  • mm : month of year (two digit)
  • M : month name short
  • MM : month name long
  • y : year (two digit)
  • yy : year (four digit)

For a basic date format: dd-mm-yy could represent "02-03-24" for March 2nd, 2024.

Important: When specifying the year format, use 'yy' for a four-digit year (e.g., 2024). Avoid using 'yyyy' as it will incorrectly repeat the year, resulting in an output like 20242024, which is not valid. Please ensure to follow the correct format codes provided above for accurate date representation in your forms.

Step 3: Define Date Layout Options

Give your Date field some style in the Layout Options section by setting the Field Label Position, Placeholder Text, and Description.

Note: In this example, "yyyy" is utilized for frontend formatting, indicating that users should enter the date as "14-03-2024." However, it is crucial not to use "yyyy" in the Calendar Date Format field during Step 2.

Step 4: Customize The Form

Customize the rest of your Form using our documentation to your left. There you will find, among other topics, a  detailed description of the Form Module settings along with how to set up a contact form, login form, post create form and so on.

Step 5: View The Result

View the result from the frontend.

More Support?

Please email us at [email protected] if you are unable to get Divi Form Builder working.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.