This post shows you how to add the customer address fields to the customer registration page.
Simply use the setShowAddressFields method to display the address fields on the registration page.
Create file: view/frontend/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"> <action method="setShowAddressFields"> <argument name="show.address.fields" xsi:type="boolean">true</argument> </action> </referenceBlock> </body> </page>
See another article about adding a Custom Field to the Billing Address in the checkout.