I want to show both the billing address and shipping address form in a user-registration page and save the data .


display address fields using customer_account_create.xml as below:

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

In template file already value set as 1 for both default_billing and default_shipping fields as 1, so by default billing and shipping, both addresses got to save the as same address.


<input type="hidden" name="default_billing" value="1">
<input type="hidden" name="default_shipping" value="1">
  • here I can only save one address the address as default billing and default shipping i want two forms that one store as default billing and another one default shipping – jithin Feb 20 '20 at 5:15
  • Did you find any solution to achieve this ? – Morgan Tartreau Nov 18 '20 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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