# Dashboard - Disable (grey out) a widget depending on another)

**URL:** <https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186>\
**Category:** Dashboard\
**Created:** [3 April 2023 08:34 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186 "2023-04-03T08:34:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)\
**Post date:** [3 April 2023 08:34 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/1 "2023-04-03T08:34:34Z")

</div>

Hello.

New day, new learning.

I asked myself how to disable/enable a numberfield for example, depending on the state of a dropdown widget.  
For example: If widget-dropdown (TimerManual) is TRUE enable/show numberfield A and B.  
IF false disable/hide numberfield A and B

My HTML skills are still limited, but i am eager to change this. Here is my "flow" rn.

```auto
[
    {
        "id": "61bd57cae5e417f2",
        "type": "ui_dropdown",
        "z": "a485bbb8dbfee062",
        "name": "",
        "label": "TimerManual:",
        "tooltip": "Change operating mode",
        "place": "",
        "group": "fa7c1f04e5714b54",
        "order": 22,
        "width": 3,
        "height": 1,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "ENABLED",
                "value": true,
                "type": "bool"
            },
            {
                "label": "DISABLED",
                "value": false,
                "type": "bool"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 100,
        "y": 240,
        "wires": [
            [
                "e28fa5b08c199603"
            ]
        ]
    },
    {
        "id": "9fa6ee2e8c1128ae",
        "type": "ui_numeric",
        "z": "a485bbb8dbfee062",
        "name": "",
        "label": "TimerManual_DosTime[s]:",
        "tooltip": "",
        "group": "fa7c1f04e5714b54",
        "order": 27,
        "width": 3,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": "1",
        "className": "",
        "x": 130,
        "y": 300,
        "wires": [
            [
                "00dc0a5cdb63e874"
            ]
        ]
    },
    {
        "id": "a9eec94708083b2a",
        "type": "ui_numeric",
        "z": "a485bbb8dbfee062",
        "name": "",
        "label": "TimerManual_Interval[s]:",
        "tooltip": "",
        "group": "fa7c1f04e5714b54",
        "order": 30,
        "width": 3,
        "height": 1,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}}",
        "min": "0",
        "max": "260000",
        "step": 1,
        "className": "",
        "x": 130,
        "y": 360,
        "wires": [
            [
                "cd03f0789fdef3a5"
            ]
        ]
    },
    {
        "id": "fa7c1f04e5714b54",
        "type": "ui_group",
        "name": "CONTROL",
        "tab": "a42d8adbe9caeb3d",
        "order": 1,
        "disp": true,
        "width": 16,
        "collapse": true,
        "className": ""
    },
    {
        "id": "a42d8adbe9caeb3d",
        "type": "ui_tab",
        "name": "Pumpe_01_Oberwaltersdorf",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

```

Thank you

---

<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:** [3 April 2023 09:43 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/2 "2023-04-03T09:43:21Z")

</div>

I see the 'TimerMan' in the dashboard, so when you refer to 'number field A and B' are you referring to 'TimerManual\_DosTime[s]' and 'TimerManual\_Interval[s]'?

---

<div class="post-metadata">

**Author:** ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)\
**Post date:** [3 April 2023 10:16 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/3 "2023-04-03T10:16:35Z")

</div>

Thank your for the answer.

yes. numberfields are TimerManual\_DosTime[s]' and 'TimerManual\_Interval[s]'.  
and this 2 fields only make sense (in my usecase) when timerManual is TRUE (enabled).

So i tried to make them disappear or grey and "unuseable" when TimerManual is false

best regards

---

<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:** [3 April 2023 10:45 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/4 "2023-04-03T10:45:46Z")

</div>

So do you want to hide those two items when false and show them when true?

Do you want to hide them when the dashboard opens?

---

<div class="post-metadata">

**Author:** ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)\
**Post date:** [3 April 2023 11:09 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/5 "2023-04-03T11:09:30Z")

</div>

sorry for my insufficient description.

to be honest i am not quiet sure. Aim was to minimize confusions and make my dashboard "cleaner", because the 2 numberfields only make sense to enter something, when timermanual is true.

> So do you want to hide those two items when false and show them when true?

Yes. Or if it is possible "grey" them out and unable to enter something, until timermanuel is true

> Do you want to hide them when the dashboard opens?

depning of the status of timermanual.

Thank your for the help

---

<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:** [3 April 2023 14:19 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/6 "2023-04-03T14:19:15Z")

</div>

If you send in a msg `msg.enabled = false` (boolean false) - that should disable/ grey out the input

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

---

<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:** [3 May 2023 14:19 UTC](https://discourse.nodered.org/t/dashboard-disable-grey-out-a-widget-depending-on-another/77186/7 "2023-05-03T14:19:46Z")

</div>

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