# Enable/disable widgets

**URL:** <https://discourse.nodered.org/t/enable-disable-widgets/99465>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [21 October 2025 01:12 UTC](https://discourse.nodered.org/t/enable-disable-widgets/99465 "2025-10-21T01:12:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregHNZ](https://avatars.discourse-cdn.com/v4/letter/g/fbc32d/32.png) [@GregHNZ](https://discourse.nodered.org/u/GregHNZ)\
**Post date:** [21 October 2025 01:12 UTC](https://discourse.nodered.org/t/enable-disable-widgets/99465/1 "2025-10-21T01:12:54Z")

</div>

Looking at [Control ui-control | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/nodes/widgets/ui-control) it would suggest that to be able to enable/disable a button or drop down box can be done by setting payload to JSON package and sending into a ui-control.  
After trying for a while I've mocked up a little slider to toggle a button to be enabled/disabled and still can't get to work  
msg.payload is essentially  
{  
"widgets": {  
"enable": [  
"6a9bb9324059ca6a"  
]  
}  
}  
where enable can be set to disable to grey out the control. and then there is an array of node ID's within this.  
Setting msg.enable to true of false does work but makes a mess of the workflow designer when trying to control multiple widgets and then turn them on in a cascade.

Any ideas why my payload into a Ui-Control node in the attached flow  
[flows (7).json](https://discourse.nodered.org/uploads/short-url/94dGIgSWWK5Uy86D0aP6aGSqeF8.json) (6.0 KB)  
doesn't work?

---

<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:** [21 October 2025 08:02 UTC](https://discourse.nodered.org/t/enable-disable-widgets/99465/2 "2025-10-21T08:02:47Z")

</div>

I'll bite.

Though I don't use DB 2.0

If you send a _message_ with `msg.enabled` set to either `true` or `false`.

`false` should disable the GUI.  
`true` should enable it.

---

<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:** [21 October 2025 08:49 UTC](https://discourse.nodered.org/t/enable-disable-widgets/99465/3 "2025-10-21T08:49:35Z")

</div>

I think that is an error in the docs, enable/disable of widgets via ui\_control is not, as far as I know, supported.

@Trying_to_learn is correct, send a message to the node or nodes with msg.enabled true or false.

---

<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 November 2025 08:49 UTC](https://discourse.nodered.org/t/enable-disable-widgets/99465/4 "2025-11-20T08:49:41Z")

</div>

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