How to add Customer Address Field in Magento 2 Sign up form?

Magneto2 customer address field on customer sign up form

Have you ever had an incredible shopping experience that completely exceeded upon your expectations? That’s what we called wow experience and this wow experience is made up of several small things keeping in mind how it can be better by reducing shopper’s efforts and make the whole shopping process buttery smooth. In today’s competitive world these things will make you stand out of the competition and turns your customer into returning one.

hyva theme development

Recently we have listed some ideas to enhance the store shopping experience and the customer account is one of them that can help a customer to buy effortlessly. And when it comes to shopping online, customer account plays an important role by saving information in their account section for future use. Once the information is stored it helps store customer to quickly complete the whole checkout process by auto-filling the required information stored previously. Here is a blog to add customer address field in Magento 2 Signup form to make checkout process easier.

Hire Magento Programmer

Firstly, you need to create ‘customer_account_create.xml‘ the file at following location using this code.
app\design\frontend\Themes\Yourtheme\Magento_Customer\layout\customer_account_create.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
      <referenceBlock name="customer_form_register">
         <arguments>
            <argument name="show_address_fields" xsi:type="boolean">true</argument>
         </arguments>
      </referenceBlock>
   </body>
</page>

You can play with this code as per your requirement of adding one of more field according to your needs.
Lastly, shine that tiny stars if you love this blog and comment down below if you face any issue while using this code.

Magento version upgrade
Happy Enhancing!

Previous Article

How to Override Frontend Store Product Price in Magento 2

Next Article

How to Get a value of a Custom attribute of Product in Magento 2 Observer

Write a Comment
  1. Tarun Kumar

    @Dhiren, Can you suggest me that How to Create Configurable Product with Virtual items in Magento 2 ?

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨