0

I created a new form registration for customer and according to group, they will be redirected to a form.

I added the fields of address in the first one by adding this code at 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 when I tried the same for the second form by adding below:

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

I got an error, also I have tried to setShowAddressFields(true) in phtml, but I got the same error too enter image description here

  • have you created customer_form_register_2 referenceBlock ? – Pawan Nov 3 '18 at 16:59
  • i have created a form and called register2 under my theme/Module_customer/templates/form and i called this template in my newmodule layout – Developper Magento Nov 4 '18 at 5:47

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.