# Is the alert window/dialog accessible form a config dialog?

**URL:** <https://discourse.nodered.org/t/is-the-alert-window-dialog-accessible-form-a-config-dialog/50628>\
**Category:** Developing Nodes\
**Created:** [5 September 2021 09:07 UTC](https://discourse.nodered.org/t/is-the-alert-window-dialog-accessible-form-a-config-dialog/50628 "2021-09-05T09:07:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [5 September 2021 09:07 UTC](https://discourse.nodered.org/t/is-the-alert-window-dialog-accessible-form-a-config-dialog/50628/1 "2021-09-05T09:07:32Z")

</div>

I'm working on a custom node where I want the user to confirm an destructive action.

My question is the editors alert box available from a custom node config dialog an how:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/9/597fd3e1c443e868cd78a29958428515f0a9a68a.png)

I like to ask the user first to make sure that the erase button isn't hit by accident:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/7/2752a2149e77f50acf74fff442b724a13670d46c.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [5 September 2021 09:25 UTC](https://discourse.nodered.org/t/is-the-alert-window-dialog-accessible-form-a-config-dialog/50628/2 "2021-09-05T09:25:06Z")

</div>

Here you go:

```auto
// Example usage for a modal dialog with buttons
   var myNotification = RED.notify("This is the message to display",{
       modal: true,
       fixed: true,
       // type: 'warning', // can be null, 'compact', 'success', 'warning', 'error'
       buttons: [
           {
               text: RED._("common.label.cancel"),
               click: function(e) {
                   myNotification.close();
               }
           },
           {
               text: RED._("common.label.ok"),
               class:"primary",
               click: function(e) {
                   myNotification.close();
               }
           }
       ]
   });

```

---

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [5 September 2021 09:28 UTC](https://discourse.nodered.org/t/is-the-alert-window-dialog-accessible-form-a-config-dialog/50628/3 "2021-09-05T09:28:01Z")

</div>

👍 that will do the job!  
Thank you for the fast response (on a Sunday)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 September 2021 09:28 UTC](https://discourse.nodered.org/t/is-the-alert-window-dialog-accessible-form-a-config-dialog/50628/4 "2021-09-19T09:28:42Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
