We use cookies to make your experience better. To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies. Learn more.
Show Address fields on Customer Registration
Would you like to ask your customers to fill their address at the time they register to your store? Let's see how you will do that.
Firstly let's have a look on the customer registration template file, which can be found under
vendor/magento/module-customer/view/frontend/templates/form/register.phtml
As we can see below on line 35 there is a method called getShowAddressFields.
So by using the method called setShowAddressFields and setting it to true, we can achieve to show the address fields. All you have to do is to create an xml layout file called customer_account_create.xml under your theme folder like
app/design/frontend///Magento_Customer/layout/customer_account_create.xml
and add the code below
So simply the registration page will look like below now.

Feel free to share this post and ask your questions in the comments below.
Till next time!