How to add alert box in admin formMagento2 : How to add confirmation alert to custom field inChange save button text in admin formHow to create and add Backend form to Custom admin grid in magento 2Delete button in admin GridHow to create Admin form in Magento 2 without using Uicomponent?How to add configurable product in wishlist in magento2How to create a parent category dropdown in admin form in magento2.2Dropdown in admin formHow to add swatches in custom option in magento2How to add radio button in custom option in magento2How to add radio button in ui modifier
Why were the first airplanes "backwards"?
I hit a pipe with a mower and now it won't turn
How could an armless race establish civilization?
How can a valley surrounded by mountains be fertile and rainy?
My colleague is constantly blaming me for his errors
How to get a character's limb regrown at 3rd level?
How did they film the Invisible Man being invisible, in 1933?
13th chords on guitar
Preferred word for "preferred", "target", "chosen" in end user support documentation
What game is this character in the Pixels movie from?
Why would anyone even use a Portkey?
Adjective for 'made of pus' or 'corrupted by pus' or something of something of pus
I just started should I accept a farewell lunch for a coworker I don't know?
If two black hole event horizons overlap (touch) can they ever separate again?
Grant dbcreator only for databases matching prefix
Closest Proximity of Oceans to Freshwater Springs
Can I travel from Germany to England alone as an unaccompanied minor?
The warming up game
Just graduated with a master’s degree, but I internalised nothing
Why did NASA wet the road in front of the Space Shuttle crawler?
Are gliders susceptible to bird strikes?
Why wasn't EBCDIC designed with contiguous alphanumeric characters?
Movie with Zoltar in a trailer park named Paradise and a boy playing a video game then being recruited by aliens to fight in space
Are the requirements of a Horn of Valhalla cumulative?
How to add alert box in admin form
Magento2 : How to add confirmation alert to custom field inChange save button text in admin formHow to create and add Backend form to Custom admin grid in magento 2Delete button in admin GridHow to create Admin form in Magento 2 without using Uicomponent?How to add configurable product in wishlist in magento2How to create a parent category dropdown in admin form in magento2.2Dropdown in admin formHow to add swatches in custom option in magento2How to add radio button in custom option in magento2How to add radio button in ui modifier
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to add the confirm box while click save button in magento2 admin form.
How to do that.
Thanks.
magento2.2 php-7
add a comment |
I want to add the confirm box while click save button in magento2 admin form.
How to do that.
Thanks.
magento2.2 php-7
add a comment |
I want to add the confirm box while click save button in magento2 admin form.
How to do that.
Thanks.
magento2.2 php-7
I want to add the confirm box while click save button in magento2 admin form.
How to do that.
Thanks.
magento2.2 php-7
magento2.2 php-7
asked Jun 20 at 6:57
Mano MMano M
1,1703 silver badges24 bronze badges
1,1703 silver badges24 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Use below code in the block file of the button
$data = [];
if ($this->getBlockId())
$data = [
'label' => __('Delete Block'),
'class' => 'delete',
'on_click' => 'deleteConfirm('' . __(
'Are you sure you want to do this?'
) . '', '' . $this->getDeleteUrl() . '', "data": )',
'sort_order' => 20,
];
return $data;
It's not working for save button
– Mano M
Jun 20 at 12:58
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
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%2f278976%2fhow-to-add-alert-box-in-admin-form%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use below code in the block file of the button
$data = [];
if ($this->getBlockId())
$data = [
'label' => __('Delete Block'),
'class' => 'delete',
'on_click' => 'deleteConfirm('' . __(
'Are you sure you want to do this?'
) . '', '' . $this->getDeleteUrl() . '', "data": )',
'sort_order' => 20,
];
return $data;
It's not working for save button
– Mano M
Jun 20 at 12:58
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
add a comment |
Use below code in the block file of the button
$data = [];
if ($this->getBlockId())
$data = [
'label' => __('Delete Block'),
'class' => 'delete',
'on_click' => 'deleteConfirm('' . __(
'Are you sure you want to do this?'
) . '', '' . $this->getDeleteUrl() . '', "data": )',
'sort_order' => 20,
];
return $data;
It's not working for save button
– Mano M
Jun 20 at 12:58
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
add a comment |
Use below code in the block file of the button
$data = [];
if ($this->getBlockId())
$data = [
'label' => __('Delete Block'),
'class' => 'delete',
'on_click' => 'deleteConfirm('' . __(
'Are you sure you want to do this?'
) . '', '' . $this->getDeleteUrl() . '', "data": )',
'sort_order' => 20,
];
return $data;
Use below code in the block file of the button
$data = [];
if ($this->getBlockId())
$data = [
'label' => __('Delete Block'),
'class' => 'delete',
'on_click' => 'deleteConfirm('' . __(
'Are you sure you want to do this?'
) . '', '' . $this->getDeleteUrl() . '', "data": )',
'sort_order' => 20,
];
return $data;
answered Jun 20 at 12:46
nishunishu
1246 bronze badges
1246 bronze badges
It's not working for save button
– Mano M
Jun 20 at 12:58
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
add a comment |
It's not working for save button
– Mano M
Jun 20 at 12:58
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
It's not working for save button
– Mano M
Jun 20 at 12:58
It's not working for save button
– Mano M
Jun 20 at 12:58
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
Can you please try xml way to add the confirmation box magento.stackexchange.com/questions/264783/…
– nishu
Jun 20 at 13:15
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
It's only working for the delete button in admin from
– Mano M
Jun 20 at 13:25
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%2f278976%2fhow-to-add-alert-box-in-admin-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