2

I am trying to remove the Associate to Website field on the following page:

Customers -> Manage Customers -> Click on a customer -> Account Information

I have checked Mage_Adminhtml_Block_Customer_Edit_Tab_Account::initForm() in this file:

app/code/local/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php

but I am unsure how it loads the fields and how to remove a field.

3

The fastest solution is in the file that you mentioned - app/code/local/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php in public function initForm() to comment/remove this lines:

$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
$form->getElement('website_id')->setRenderer($renderer);

and below them to add:

$fieldset->removeField('website_id');
2
  • Upvote for you!! Dec 16 '16 at 12:14
  • HI @michael, How to do that in Magento 2. I am using Magento 2 right now. Feb 8 '17 at 12:32

Your Answer

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

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