0

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.

1 Answer 1

0

It should be :

{{block class="Magento\Customer\Block\Form\Register" template="Magento_Customer::form/dealerregister.phtml"}}
2
  • Thanks for the reply. How to add custom form elements to this dealearregister.html? I want to make the user to directly register into "Dealer" course group, how to do that?
    – Mounika
    Jun 7, 2018 at 11:58
  • You can not set customer group through registration form as it is restricted. So you need to use event "customer_register_success" and update the customer group. By the way, you should create a module for this and should not use cms page for registration form.
    – Sandipan S
    Jun 8, 2018 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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