In the customer/edit page (adminhtml) I set up some custom fields, they appear by default under information account tab.

I created an observer (event is adminhtml_block_html_before), and I need to remove the fields from the form. I see there is a removeField method I could use, but I cannot find any explanation on how to do it from the observer.


you can try this


or this

// Remove the elementId from the form
// Remove the fieldset

or you can just disabled it

$event = $observer->getEvent();
$form = $event->getForm();    
$form->getElement('is_active')->setData('disabled', true);

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.