0

How to add following below fields to the fronted customer registration form.

  • 1.company
  • 2.Address
  • 3.street
  • 4.city
  • 5.state
  • 6.country
  • 7.zip code
  • 8.phone no
  • 9.federal tax id
2

1 Answer 1

1

To show address fields in registration form, Create the customer_account_create.xml file on the path app/design/<Vendor>/<Theme>/Magento_Customer/layout and add the below code:

<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">
        <action method="setShowAddressFields">
            <argument name="show.address.fields" xsi:type="boolean">true</argument>
        </action>
    </referenceBlock>
</body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.