# Help disabling a widget in node-red dashboard

**URL:** <https://discourse.nodered.org/t/help-disabling-a-widget-in-node-red-dashboard/10895>\
**Category:** Dashboard\
**Created:** [7 May 2019 18:06 UTC](https://discourse.nodered.org/t/help-disabling-a-widget-in-node-red-dashboard/10895 "2019-05-07T18:06:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kraigen](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@kraigen](https://discourse.nodered.org/u/kraigen)\
**Post date:** [7 May 2019 18:06 UTC](https://discourse.nodered.org/t/help-disabling-a-widget-in-node-red-dashboard/10895/1 "2019-05-07T18:06:50Z")

</div>

Hi, everyone!

I'm pretty new to node-red dashboard and I read in the documentation that in order to disable a widget one must pass a msg.enabled property set to false. I'm trying to have a switch that disables a switch and a button in its off position. I don't know how to go about passing that property to the switch and button nodes.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [7 May 2019 18:48 UTC](https://discourse.nodered.org/t/help-disabling-a-widget-in-node-red-dashboard/10895/2 "2019-05-07T18:48:44Z")

</div>

So I will assume that when the control switch is 'OFF' you want the two other widgets disabled and when it is on, you want them enabled. Try this:

send the output of the switch to a `switch` node and check for on and off. Now you will have two outputs. Connect to a change node that changes `msg.enabled` to `true` or `false` and feed that to the two other ui nodes.

---

<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:** [7 May 2019 20:09 UTC](https://discourse.nodered.org/t/help-disabling-a-widget-in-node-red-dashboard/10895/3 "2019-05-07T20:09:50Z")

</div>

or set the control switch to send boolean true and false - and then a change node set to move msg.payload to msg.enabled then to the other other nodes

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [7 May 2019 21:43 UTC](https://discourse.nodered.org/t/help-disabling-a-widget-in-node-red-dashboard/10895/4 "2019-05-07T21:43:37Z")

</div>

@dceejay - Nice!! Much cleaner! (wish I'd thought of it 😜 )  
Just the ui\_switch and a change node instead of my ui\_switch to switch to two change nodes and wires all over...
