Add Date of Birth field in Registration Form in Magento 2

Date of Birth is a customer attribute required to know the birthday details and offer personalized birthday offers during the birthday month. There are various other reasons for store owners to know the Date of Birth of the customer during registration. 

It helps know the age group of the customer. It helps in targeting customers based on the products appropriate for their age. It is also highly beneficial in recognizing the psychographic purchasing behavior of customers on the basis of age group.

In today’s tutorial, we will help you with a detailed guide to adding the date of birth field in the registration on your eCommerce store. 

How to Add Date of Birth field in Registration Form in Magento 2?

Follow below steps to add date of birth field in customer registration form in Magento 2.

Step 1. Login to Magento 2 Admin Panel

First of all, all you need to do is login to the Magento 2 admin panel.

Magento 2 Admin Panel

Step 2. Navigate to “Customer” field

Next, navigate to Stores > Configuration

Navigate to Store Configuration in Magento 2

After that you will see below screen.

Customer Configuration Tab in Magento 2

Step 3. Select Customer Configuration

Select Customer Configuration in Magento 2

Step 4. Configure Name and Address Options

After selecting Customer Configuration, you will get full options included in this field. Navigate to Name and Address Options and expand it you will see the options shown in below screenshot.

Customer Name and Address Options Configuration

Step 5.  Set Required in the field “Show Date of Birth”

In the Show Date of Birth field, there are 3 options: No, Optional and Required to choose. Please select Required for this field.

Select Required in Show Date of Birth field

Step 6. Save the configuration

Lastly, you only need to click on the Save Config button to complete.

Save the configuration

In order to add various customer attributes, a store owner can always use our Magento 2 Customer Attributes Extension. It lets you create a variety of customer attributes by displaying additional attribute fields at various places on the eCommerce store.

We hope this proves to be a helpful guide for your eCommerce store. Still, if you get stuck anytime, feel free to reach us out.

Also read: How to Add “Use Default Value” Checkbox in UI Form of Online Store?