How to remove save and reset button from edit form?
Add this in the method you mentioned
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
Note that Magento does not want you to override the __construct
method. You should override the _construct
method instead. One problem is that you cannot remove buttons in the _construct
method. But you can simply override the _prepareLayout
method for that purpose:
protected function _prepareLayout()
{
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
return parent::_prepareLayout();
}
To remove buttons on MAGENTO 2 admin form:
$this->buttonList->remove('delete');
$this->buttonList->remove('save');
$this->buttonList->remove('reset');
$this->buttonList->remove('back');