Magento – Magento 2 – separate registration form to register into customer group with custom field

magento2registration

I want to add a separate registration form in Magento 2 store with the users directly go into a particular Customer Group and also I want to show up some custom fields too.

More explanation:

I have a customer group "dealer" and I want to create a separate user registration form when the user's register, there directly go into the "dealer" group, and also I want to show some custom fields too (these fields should not show up on the default registration form of the M2 store)

What I did is:

The registration form is coming from
/app/design/frontend/Mgs/claue/Magento_Customer/templates/form/register.phtml

So I duplicated that to

/app/design/frontend/Mgs/claue/Magento_Customer/templates/form/dealerregister.phtml

And tried calling this form into CMS page by
{{block class="Magento\Customer\Block\Form\Register" template="Magento_customer::dealerregister.phtml"}} but not gettnig anyouput on the page.

Best Answer

It should be :

{{block class="Magento\Customer\Block\Form\Register" template="Magento_Customer::form/dealerregister.phtml"}}
Related Topic