# An Alternate Pop Up Dialog?

**URL:** <https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591>\
**Category:** General\
**Created:** [26 December 2019 09:16 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591 "2019-12-26T09:16:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![KELVINHAN95](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@KELVINHAN95](https://discourse.nodered.org/u/KELVINHAN95)\
**Post date:** [26 December 2019 09:16 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/1 "2019-12-26T09:16:40Z")

</div>

Hi, so far the only pop up i can see is the ok/cancel dialog.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/998bcac239a7e12fc49aef7a7f4188763d9a8a5b.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a9f26706d25b383c2d262ad9bfd567d64c617b35.png)

However I need something slightly different. Instead of an OK/Cancel pop up, i need one that allows the user to manually type the message on the pop up, and that msg becomes msg.payload.

For example they can type, "Machine Breakdown due to electrical failure".

Or even one that gives a range of selection for the user to choose from

Any idea?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [26 December 2019 09:22 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/2 "2019-12-26T09:22:31Z")

</div>

Can I suggest you keep your (related) questions (about the same topic) to just one thread otherwise the channel gets flooded.

---

<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:** [26 December 2019 11:21 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/3 "2019-12-26T11:21:14Z")

</div>

Allowing an input for feedback isn't a bad idea.  
Will have a look over the vacation.

---

<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:** [26 December 2019 12:27 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/4 "2019-12-26T12:27:37Z")

</div>

It's your lucky day - have pushed an update to master branch (not yet on npm) that adds a feedback option to the dialog.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/97720147a0ca90f0c22c0b3def72394ef594d8c2.png)

---

<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:** [26 December 2019 13:39 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/5 "2019-12-26T13:39:56Z")

</div>

Nice update. Did someone mention flows requiring password authorization?

```auto
var passwd = msg.payload;
if (passwd=="mypassword"){
    node.send({"payload": "pass"});
} else node.send({"payload": "fail"});

```

...just a thought...

Or by using a 'switch' node;

![passwd](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bf49f192861418b3f8e859f1a820bb3b5be276d7.jpeg)

---

<div class="post-metadata">

**Author:** ![KELVINHAN95](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@KELVINHAN95](https://discourse.nodered.org/u/KELVINHAN95)\
**Post date:** [27 December 2019 01:04 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/6 "2019-12-27T01:04:08Z")

</div>

Hi thanks for that update. But when will I be able to access it on node red? 🙂

---

<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:** [27 December 2019 10:16 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/7 "2019-12-27T10:16:39Z")

</div>

you can install from master if you wish to try it

```auto
cd ~/.node-red
npm i node-red/node-red-dashboard

```

---

<div class="post-metadata">

**Author:** ![OmegaJune](https://avatars.discourse-cdn.com/v4/letter/o/7cd45c/32.png) [@OmegaJune](https://discourse.nodered.org/u/OmegaJune)\
**Post date:** [28 February 2020 00:13 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/8 "2020-02-28T00:13:53Z")

</div>

I think I found a bug. When I try to use the OK/Cancel with input as just and OK with input (no secondary button), the text input is missing.  
 ![Screen Shot 2020-02-27 at 4.07.24 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77983a48d0608d631de646d04df02088a573343f.png)

![Screen Shot 2020-02-27 at 4.09.11 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fcf5847a18c60bec821261f70ca80281abfa3e25.png)

I get around this by putting the flow in a loop that keeps showing the notification until you press OK.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 February 2020 07:37 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/9 "2020-02-28T07:37:42Z")

</div>

I don't fully understand what you are saying, can you post a very small flow exhibiting the problem?  
Also tell us which versions of node-red, dashboard, and nodejs you are using.

---

<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:** [28 February 2020 09:25 UTC](https://discourse.nodered.org/t/an-alternate-pop-up-dialog/19591/10 "2020-02-28T09:25:08Z")

</div>

The thinking was that if if you had an input then you have to allow the user to cancel their input in case they change their mind.

Looking at the Angular options in fact the .prompt() we use always has the cancel button there - so either you can have the input feedback but have the cancel button - or not have feedback (as we can just use the .alert() function instead.

If we detect no text for cancel we auto switch to the alert style - I guess we could just leave it - but then you would get a blank button if left blank...
