How to remove save and reset button from edit form?Add confirmation pop-up to admin form “Save”...
Do I have to worry about players making “bad” choices on level up?
Phrase for the opposite of "foolproof"
Why is current rating for multicore cable lower than single core with the same cross section?
What does "rf" mean in "rfkill"?
Electric guitar: why such heavy pots?
Nginx subdirectory wordpress wp-login redirects to 404 not found
get exit status from system() call
Can my Warlock be invisible and attack with its familiar?
When India mathematicians did know Euclid's Elements?
Do generators produce a fixed load?
When and why did journal article titles become descriptive, rather than creatively allusive?
Can solid acids and bases have pH values? If not, how are they classified as acids or bases?
Transfer over $10k
Packing rectangles: Does rotation ever help?
How to stop co-workers from teasing me because I know Russian?
Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?
How to figure out whether the data is sample data or population data apart from the client's information?
How does a swashbuckler fight with two weapons and safely dart away?
Feels like I am getting dragged in office politics
What's the polite way to say "I need to urinate"?
Where did the extra Pym particles come from in Endgame?
Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?
What are the spoon bit of a spoon and fork bit of a fork called?
How to pronounce 'C++' in Spanish
How to remove save and reset button from edit form?
Add confirmation pop-up to admin form “Save” buttonCalling js function when product save button is clicked?Magento2 : How to add delete button in custom form in backendCustom button on edit product pageMagento 2 : Not able to save admin form after adding multiple tabsEdit Form not showing the values in input fieldsReset Filter And Search Not Working In Admin GridBack-End “Save and Continue Edit” Button Works PartiallyMagento 2 Add new field to Magento_User admin formMagento Create from inside the admin grid edit form save
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
In custom module I have one grid. in that grid i don't want to edit data from admin panel. I want to just view of that data so i want to remove save button and reset button.
In Edit.php
public function __construct()
{
parent::__construct();
$this->_objectId = "example_id";
$this->_blockGroup = "example";
$this->_controller = "adminhtml_example";
// $this->_updateButton("save", "label", Mage::helper("example")->__("Save Tutor"));
$this->_updateButton("delete", "label", Mage::helper("example")->__("Delete Tutor"));
/**
$this->_addButton("saveandcontinue", array(
"label" => Mage::helper("example")->__("Save And Continue Edit"),
"onclick" => "saveAndContinueEdit()",
"class" => "save",
), -100);
$this->_formScripts[] = "
function saveAndContinueEdit() {
editForm.submit($('edit_form').action+'back/edit/');
}
";
*/
}
I m comment code of save button and saveAndContinueEdit button but save button is display.
I know another way to admin can't save data using disable set as true in all addfield but i want to remove add button and reset button if possible and i want to remove this button using custom module.
magento-1.9 adminform
add a comment |
In custom module I have one grid. in that grid i don't want to edit data from admin panel. I want to just view of that data so i want to remove save button and reset button.
In Edit.php
public function __construct()
{
parent::__construct();
$this->_objectId = "example_id";
$this->_blockGroup = "example";
$this->_controller = "adminhtml_example";
// $this->_updateButton("save", "label", Mage::helper("example")->__("Save Tutor"));
$this->_updateButton("delete", "label", Mage::helper("example")->__("Delete Tutor"));
/**
$this->_addButton("saveandcontinue", array(
"label" => Mage::helper("example")->__("Save And Continue Edit"),
"onclick" => "saveAndContinueEdit()",
"class" => "save",
), -100);
$this->_formScripts[] = "
function saveAndContinueEdit() {
editForm.submit($('edit_form').action+'back/edit/');
}
";
*/
}
I m comment code of save button and saveAndContinueEdit button but save button is display.
I know another way to admin can't save data using disable set as true in all addfield but i want to remove add button and reset button if possible and i want to remove this button using custom module.
magento-1.9 adminform
add a comment |
In custom module I have one grid. in that grid i don't want to edit data from admin panel. I want to just view of that data so i want to remove save button and reset button.
In Edit.php
public function __construct()
{
parent::__construct();
$this->_objectId = "example_id";
$this->_blockGroup = "example";
$this->_controller = "adminhtml_example";
// $this->_updateButton("save", "label", Mage::helper("example")->__("Save Tutor"));
$this->_updateButton("delete", "label", Mage::helper("example")->__("Delete Tutor"));
/**
$this->_addButton("saveandcontinue", array(
"label" => Mage::helper("example")->__("Save And Continue Edit"),
"onclick" => "saveAndContinueEdit()",
"class" => "save",
), -100);
$this->_formScripts[] = "
function saveAndContinueEdit() {
editForm.submit($('edit_form').action+'back/edit/');
}
";
*/
}
I m comment code of save button and saveAndContinueEdit button but save button is display.
I know another way to admin can't save data using disable set as true in all addfield but i want to remove add button and reset button if possible and i want to remove this button using custom module.
magento-1.9 adminform
In custom module I have one grid. in that grid i don't want to edit data from admin panel. I want to just view of that data so i want to remove save button and reset button.
In Edit.php
public function __construct()
{
parent::__construct();
$this->_objectId = "example_id";
$this->_blockGroup = "example";
$this->_controller = "adminhtml_example";
// $this->_updateButton("save", "label", Mage::helper("example")->__("Save Tutor"));
$this->_updateButton("delete", "label", Mage::helper("example")->__("Delete Tutor"));
/**
$this->_addButton("saveandcontinue", array(
"label" => Mage::helper("example")->__("Save And Continue Edit"),
"onclick" => "saveAndContinueEdit()",
"class" => "save",
), -100);
$this->_formScripts[] = "
function saveAndContinueEdit() {
editForm.submit($('edit_form').action+'back/edit/');
}
";
*/
}
I m comment code of save button and saveAndContinueEdit button but save button is display.
I know another way to admin can't save data using disable set as true in all addfield but i want to remove add button and reset button if possible and i want to remove this button using custom module.
magento-1.9 adminform
magento-1.9 adminform
edited May 17 '17 at 4:37
sv3n
10.1k62557
10.1k62557
asked May 22 '15 at 7:19
ND17ND17
3,49673370
3,49673370
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Add this in the method you mentioned
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
add a comment |
To remove buttons on MAGENTO 2 admin form:
$this->buttonList->remove('delete');
$this->buttonList->remove('save');
$this->buttonList->remove('reset');
$this->buttonList->remove('back');
add a comment |
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();
}
1
That's true, but there are a lot of core classes that override the__construct
method.
– Marius♦
May 22 '15 at 8:35
1
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f68760%2fhow-to-remove-save-and-reset-button-from-edit-form%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Add this in the method you mentioned
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
add a comment |
Add this in the method you mentioned
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
add a comment |
Add this in the method you mentioned
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
Add this in the method you mentioned
$this->_removeButton('save');
$this->_removeButton('delete');
$this->_removeButton('reset');
answered May 22 '15 at 7:23
Marius♦Marius
168k28324694
168k28324694
add a comment |
add a comment |
To remove buttons on MAGENTO 2 admin form:
$this->buttonList->remove('delete');
$this->buttonList->remove('save');
$this->buttonList->remove('reset');
$this->buttonList->remove('back');
add a comment |
To remove buttons on MAGENTO 2 admin form:
$this->buttonList->remove('delete');
$this->buttonList->remove('save');
$this->buttonList->remove('reset');
$this->buttonList->remove('back');
add a comment |
To remove buttons on MAGENTO 2 admin form:
$this->buttonList->remove('delete');
$this->buttonList->remove('save');
$this->buttonList->remove('reset');
$this->buttonList->remove('back');
To remove buttons on MAGENTO 2 admin form:
$this->buttonList->remove('delete');
$this->buttonList->remove('save');
$this->buttonList->remove('reset');
$this->buttonList->remove('back');
edited 25 mins ago
Abdelkebir ELHARFALI
488
488
answered May 16 '17 at 21:44
Nathaniel MeyerNathaniel Meyer
1431210
1431210
add a comment |
add a comment |
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();
}
1
That's true, but there are a lot of core classes that override the__construct
method.
– Marius♦
May 22 '15 at 8:35
1
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
add a comment |
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();
}
1
That's true, but there are a lot of core classes that override the__construct
method.
– Marius♦
May 22 '15 at 8:35
1
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
add a comment |
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();
}
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();
}
answered May 22 '15 at 8:10
SimonSimon
4,64911960
4,64911960
1
That's true, but there are a lot of core classes that override the__construct
method.
– Marius♦
May 22 '15 at 8:35
1
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
add a comment |
1
That's true, but there are a lot of core classes that override the__construct
method.
– Marius♦
May 22 '15 at 8:35
1
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
1
1
That's true, but there are a lot of core classes that override the
__construct
method.– Marius♦
May 22 '15 at 8:35
That's true, but there are a lot of core classes that override the
__construct
method.– Marius♦
May 22 '15 at 8:35
1
1
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
@Marius Core classes are often not good as a reference for good code style I think :D
– Simon
May 22 '15 at 9:38
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f68760%2fhow-to-remove-save-and-reset-button-from-edit-form%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown