0

I have created another form registration for customer and according to group he will be redirected to a form. I added the fields of address in the first one by adding this code in customer_account_create.xml.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" 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>

but I don't know how to do it for the second. I also tried to do the same in this XML by duplicating the reference block :

<referenceBlock name="customer_form_register_2">
    <action method="setShowAddressFields">
        <argument name="show.address.fields" xsi:type="boolean">true</argument>
    </action>
</referenceBlock>

but I got this error Fatal error

so how to fix this please

  • i even tried in the register2.phtml to put setShowFieldsAddress(true) but same error so how to fix that ? – Developper Magento Nov 2 '18 at 13:09
  • Seems you have implement the customer registration form at the custom page. I guess that you don't implement customer registration form at this page – Amit Bera Nov 2 '18 at 13:45
  • i am sorry but i did not understand your note – Developper Magento Nov 2 '18 at 13:47
  • Mean you have to try to implementing customer registration at custom page? – Amit Bera Nov 2 '18 at 13:53
  • what is implementi,g what does this mean ? – Developper Magento Nov 2 '18 at 13:55

Your Answer

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

Browse other questions tagged or ask your own question.