# FlexDash OK/Cancel Dialogue Input

**URL:** <https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236>\
**Category:** General\
**Tags:** flexdash\
**Created:** [5 January 2023 16:27 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236 "2023-01-05T16:27:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [5 January 2023 16:27 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/1 "2023-01-05T16:27:14Z")

</div>

Searched everywhere, but could not locate how to get something equivalent to OK/Cancel Dialogue available in NR-Dashboard in FlexDash  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/19edd86e695bd2ff577a6244332931e4b568ed9a.png)  
custom widget library also does not have anything similar. (or may be i dont quite understand)

---

<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:** [5 January 2023 17:11 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/2 "2023-01-05T17:11:50Z")

</div>

2 buttons dropped into a solid panel??

![OK](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/85fad94309ad26f904e976b835a20a1d4e18b9c8.jpeg)

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [5 January 2023 18:04 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/3 "2023-01-05T18:04:29Z")

</div>

Yup, it's an area needing improvement, but you can make it work already.  
You can have a panel as Paul suggests. You can furthermore put that panel into a pop-up grid and you can make that grid pop-up only for a specific client (using msg.\_fd\_socket). That gets you a pop-up OK/Cancel.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [6 January 2023 01:08 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/4 "2023-01-06T01:08:08Z")

</div>

Solid Panel worked for me, however, i want the dialog box _ **appear** _ when an event happens, for which popup panel is the right choice, could not get the popup to work though, the example shows how to 'trigger' a popup on a button press, but when i send any 'message' in to the widget it (popup) does not get activated. how do i activate a popup upon sending a message say a boolean true?

I select an email id from a dropdown box, and it gives me a msg.payload, I want then the flow to _ask_ a question in a popup do you want to send an email to the selected ID, then if yes...or no....i can chose to send the mail or not.

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [6 January 2023 02:51 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/5 "2023-01-06T02:51:44Z")

</div>

Hmm, I should have a demo flow for this... 🙄 😢

The help for the FD ctrl node has a description:

> ## Input messages (Node-RED-\>FlexDash)
> 
> Input messages must have a `msg.action` field and must target a component using one of `msg.tab`, `msg.grid`, or `msg.panel`.
> 
> The target value is used to find a matching node ID, node name, node title, or (for tabs) icon; all in that order. (Using the node ID is recommended and all FlexDash config nodes show their ID in the flow editor edit panel.)
> 
> The `msg._fd_socket` is supported for open/close (but not edit) to target individual clients.
> 
> The set of actions is:
> 
> - `open`: open the tab or grid targeted by `msg.topic`.
> - `close`: close the grid targeted by `msg.topic`.
> - `edit`: edit the targeted component, setting one or multiple properties to the corresponding values in `msg`. Supports tabs, grids, and panels.
> 
> Note that open/close affect only the current state of browsers, nothing is persisted.  
> Edit actions modify the state in Node-RED memory and thus affect future clients (these changes are lost when the affected config nodes are redeployed orwhen Node-RED is restarted).

I used a change node to set the value for one of my use-cases:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/7/17a3420fd982fddd51d90ecd30da7b6e740340fa.png)

You can find the grid's Node-ID in its edit panel (or can use the name/title as described). I hope this makes it work for you, if not, please post your flow.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [6 January 2023 08:19 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/6 "2023-01-06T08:19:42Z")

</div>

Got it to working. Finally. No Problem with the Docs. my understanding is far inferior.  
Yes, a working example will make it very easy, BUT, this way i will learn and remember. 😉

---

<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:** [20 January 2023 08:20 UTC](https://discourse.nodered.org/t/flexdash-ok-cancel-dialogue-input/73236/7 "2023-01-20T08:20:39Z")

</div>

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