# "Are You Sure?" Pop-ups

**URL:** https://discourse.nodered.org/t/are-you-sure-pop-ups/13458
**Category:** Dashboard
**Created:** [18 July 2019 18:40 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458 "2019-07-18T18:40:13Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![HYPER](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HYPER](https://discourse.nodered.org/u/HYPER)
#### Post date: [19 July 2019 22:33 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/21 "2019-07-19T22:33:34Z")

</div>

Still may be useful though! Definitely don't wan't this to be accidentally triggered

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [19 July 2019 22:35 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/22 "2019-07-19T22:35:04Z")

</div>

(I think Paul means to look at his code in reply #1 - his first reply.)

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [19 July 2019 22:36 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/23 "2019-07-19T22:36:20Z")

</div>

> [@HYPER](#):
>
> The example from post 4 has no code in it

But post #2 does...  
I then said;

> [@Paul-Reed](#):
>
> A bit of coding in the function node will be needed.

...and

> [@Paul-Reed](#):
>
> You can use the same principle with a switch as well as a button

---

<div class="post-metadata">

### Author: ![HYPER](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HYPER](https://discourse.nodered.org/u/HYPER)
#### Post date: [19 July 2019 22:44 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/24 "2019-07-19T22:44:13Z")

</div>

I tried using the code from that example, it didn't seem to work. When you say

> [@Paul-Reed](#):
>
> A bit of coding in the function node will be needed.

I'm not sure what that would look like in my context for the function node

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [19 July 2019 23:06 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/25 "2019-07-19T23:06:15Z")

</div>

> [@HYPER](#):
>
> I'm not sure what that would look like in my contex....

I've pointed you in the right direction & included an example flow, but I don't intend to write the code for you...  
Especially if you are developing a flow to shut down a fuel cell in a emergency situation, you need to be confident that it will work as intended.  
The javascript in your function node falls well short, and a lot of work is needed for this to work as intended.

Good luck

Paul

---

<div class="post-metadata">

### Author: ![HYPER](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@HYPER](https://discourse.nodered.org/u/HYPER)
#### Post date: [19 July 2019 23:10 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/26 "2019-07-19T23:10:48Z")

</div>

I will do my best. Thanks for the help

---

<div class="post-metadata">

### Author: ![10der](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/10der/32/1202_2.png) [@10der](https://discourse.nodered.org/u/10der)
#### Post date: [16 February 2020 14:58 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/27 "2020-02-16T14:58:57Z")

</div>

```auto
[{"id":"a081a6de.1050d8","type":"ui_switch","z":"4a6e169c.b17938","name":"Electrolyzer Kill Switch","label":"Electrolyzer Kill Switch","tooltip":"","group":"fb40af38.a5323","order":18,"width":"3","height":"1","passthru":false,"decouple":"true","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"fa-2x fa-bolt","oncolor":"yellow","offvalue":"1","offvalueType":"str","officon":"fa-2x fa-power-off","offcolor":"gray","x":460,"y":560,"wires":[["17ca4c3e.bda904"]]},{"id":"fad54ede.a0757","type":"ui_toast","z":"4a6e169c.b17938","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"Cancel","raw":false,"topic":"","name":"Deploy?","x":460,"y":640,"wires":[["e236a593.a05ce8"]]},{"id":"e236a593.a05ce8","type":"function","z":"4a6e169c.b17938","name":"Confirm","func":"//only accept OK msg's\nif (msg.payload == 'OK') {\n msg.payload = msg.value;\n node.send(msg);\n}\nreturn null;","outputs":1,"noerr":0,"x":620,"y":640,"wires":[["a081a6de.1050d8"]]},{"id":"17ca4c3e.bda904","type":"change","z":"4a6e169c.b17938","name":"","rules":[{"t":"set","p":"value","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":640,"wires":[["fad54ede.a0757"]]},{"id":"fb40af38.a5323","type":"ui_group","z":"","name":"Swtiches","tab":"35190788.171598","order":2,"disp":false,"width":"11","collapse":false},{"id":"35190788.171598","type":"ui_tab","z":"","name":"Hydrogen Liquifying Station","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![monkeyjacob17](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/monkeyjacob17/32/19971_2.png) [@monkeyjacob17](https://discourse.nodered.org/u/monkeyjacob17)
#### Post date: [1 April 2020 13:52 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/28 "2020-04-01T13:52:49Z")

</div>

Hi,

Thank for this answer. Could you tell me how you create your own notification block? I would like to create un pop up block where we can write a text, maybe the notification with input. Could you tell where I could read something about that in order to understand how to create what you did? Thanks

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [1 April 2020 16:34 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/29 "2020-04-01T16:34:19Z")

</div>

The built in ui\_notification node now has the ability to accept input if required.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/82524185c634656ded93aa7e0fc1e88ac6d68b58.png)

---

<div class="post-metadata">

### Author: ![monkeyjacob17](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/monkeyjacob17/32/19971_2.png) [@monkeyjacob17](https://discourse.nodered.org/u/monkeyjacob17)
#### Post date: [2 April 2020 00:09 UTC](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458/30 "2020-04-02T00:09:02Z")

</div>

Yes I know. I'm using the flow Paul Reed and as output as the block deploy, I need to know if the button "Stop" has been clicked or not. I know with the message. If I'm using the input from the dialog, how can I get the text written? Could we generate a second output with another message?

[Previous page](https://discourse.nodered.org/t/are-you-sure-pop-ups/13458.md?page=1)
