I have a problem on customer account create form on frontend. As it can be seen in the screenshot provided. First Name, Last Name and Email fields are duplicated.

Where is the logic that generates that block and how does Magento decide which fields to put there?

I've manage to find module-customer/view/frontend/templates/form/register.phtml by looking into module-customer/view/frontend/layout/customer_account_create.xml

On line 25 this is called <?php echo $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')->setObject($block->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>

I've checked out 'Magento\Customer\Block\Widget\Name' but can not find the portion of code that decides how many fields to show and on what information is this based on.

Any pointers on how to debug this or further inspect are highly appreciated.


I found the template associated with the widget module-customer/view/frontend/templates/widget/name.phtml still can't figure out the duplicates or from where email appeared given that it is nowhere to be found in this template

enter image description here

1 Answer 1


After enabling the template path hints I've noticed that it is in the custom attributes block.

Went to db an noticed that all 3 had is_user_defined to true that was causing my duplicates.

Changed that to false. Everything is peachy now.

Your Answer

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

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