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

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.

[
    {
        "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

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]'?

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

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?

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

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

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