# Input locked for user - in Runtime

**URL:** https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139
**Category:** Dashboard
**Created:** [4 January 2023 02:13 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139 "2023-01-04T02:13:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [4 January 2023 02:13 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/1 "2023-01-04T02:13:20Z")

</div>

Hello friends,

I would like to know if there is a certain property in dasboard\_ui controls.

The following is:

I would like some input type widgets like: text/sliders/dropdown and other input.

I would like to disable the possibility for the user to change it at runtime.

I know that there is enable/disable but I don't know if there is "locked".

Some programming languages ​​have this property.

Does dasboard\_ui have this feature?

---

<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: [4 January 2023 09:07 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/2 "2023-01-04T09:07:03Z")

</div>

> [@allacmc](#):
>
> I know that there is enable/disable but I don't know if there is "locked".

What is the difference?

---

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [4 January 2023 20:40 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/3 "2023-01-04T20:40:46Z")

</div>

When you disable the object. He disappears from the screen.

When you lock the object, it continues to be shown on the screen, but the user cannot move it.

---

<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: [4 January 2023 20:45 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/4 "2023-01-04T20:45:38Z")

</div>

That's different to how I understand it.

`disabled` means it doesn't accept input.  
It is (or should be) still visible.

Unless you are talking at the EDIT level.  
(After re-reading your post, I fear that is where the confusion is)

Get an `inject` node just before the GUI node.  
Set the `inject` node to:  
`msg.enabled` --\> `false` and connect the output of the `inject` node to the GUI node.  
Press the `inject` node (after deploy) and see if that gets what you want to do on the GUI side of things.

---

<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: [4 January 2023 21:01 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/5 "2023-01-04T21:01:04Z")

</div>

> [@allacmc](#):
>
> but the user cannot move it

What do you mean by cannot move it? Are you talking about using the node-red dashboard or the node-red flow editor? I assumed you were talking about the dashboard. Or perhaps you mean move the slider. If so then @Trying_to_learn is correct. If you disable the ui-node it should go grey (I think) and not allow input.

---

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [4 January 2023 22:17 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/6 "2023-01-04T22:17:49Z")

</div>

First I want to apologize if I wrote something wrong. It's just that my original language is Portuguese Brazil.

I use google translate to translate.

When I refer to "Locked" I am referring to the dasboard\_ui element on the user's screen.

I don't mean the nods in nod-red.

The current dasboard\_ui configuration is when you disable it, it adds the element to the screen. It does not lock the element.

That's the point.

I wanted to know if there is a way to lock the element on the screen I don't want it to disappear from the screen.

---

<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: [4 January 2023 22:22 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/7 "2023-01-04T22:22:24Z")

</div>

Try what I said.

```auto
[{"id":"f9b89c2217155145","type":"inject","z":"f7d630bfc1b2f259","name":"Disable","props":[{"p":"disabled","v":"true","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":2800,"wires":[[]]}]

```

![Screenshot from 2023-01-05 09-21-04](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/ee339b5a6559eee4bd00d400e5f4bd89bbbf180c.png)

---

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [4 January 2023 23:05 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/8 "2023-01-04T23:05:01Z")

</div>

is not work

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b431c0a190c1e06dc46be0e8ecb45d5a1e61658c.png)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [4 January 2023 23:12 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/9 "2023-01-04T23:12:55Z")

</div>

I believe it is `msg.enabled` not `msg.disabled` and `false` to disable. and `true` to enable.

---

<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: [6 January 2023 05:45 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/10 "2023-01-06T05:45:40Z")

</div>

Thanks for that.

---

<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: [6 January 2023 05:46 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/11 "2023-01-06T05:46:41Z")

</div>

Greatest apologies for my mistake.

After @E1cid corrected it, have you had any luck?

---

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [6 January 2023 16:18 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/12 "2023-01-06T16:18:30Z")

</div>

No, there is no such feature in the node-red dashboard

---

<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 16:40 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/13 "2023-01-06T16:40:18Z")

</div>

```auto
[{"id":"b804e441c7dae229","type":"inject","z":"bbf5094bc59a03b8","name":"Enable","props":[{"p":"enabled","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":900,"y":1020,"wires":[["b47974f481265742"]]},{"id":"b47974f481265742","type":"ui_slider","z":"bbf5094bc59a03b8","name":"","label":"slider","tooltip":"","group":"e7248049173432e6","order":3,"width":0,"height":0,"passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":10,"step":1,"className":"","x":1030,"y":1020,"wires":[[]]},{"id":"8a64fabb6ede9a7b","type":"inject","z":"bbf5094bc59a03b8","name":"Disable ","props":[{"p":"enabled","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":890,"y":1060,"wires":[["b47974f481265742"]]},{"id":"e7248049173432e6","type":"ui_group","name":"Default","tab":"4416caf9db5c96d9","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"4416caf9db5c96d9","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<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: [6 January 2023 16:44 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/14 "2023-01-06T16:44:17Z")

</div>

Well this non-existent feature seems to work for me, as in the flow posted by @smanjunath211

---

<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 16:49 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/15 "2023-01-06T16:49:41Z")

</div>

modified the flow to include enable/disable button in dashboard and inject nodes in editor

import this flow and let us know where are you having issue

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5afa7f06eebcf2031ed3b1eeaef02bce347758b0.png)

![enable_disable](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/791330df1aa2cf6d0847ef4ca5f840df10630daa.gif)

```auto
[{"id":"b804e441c7dae229","type":"inject","z":"bbf5094bc59a03b8","name":"Enable","props":[{"p":"enabled","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":870,"y":1020,"wires":[["b47974f481265742"]]},{"id":"b47974f481265742","type":"ui_slider","z":"bbf5094bc59a03b8","name":"","label":"slider","tooltip":"","group":"e7248049173432e6","order":3,"width":0,"height":0,"passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":10,"step":1,"className":"","x":1050,"y":1020,"wires":[[]]},{"id":"8a64fabb6ede9a7b","type":"inject","z":"bbf5094bc59a03b8","name":"Disable ","props":[{"p":"enabled","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":870,"y":1060,"wires":[["b47974f481265742"]]},{"id":"3eb5f221ddaabbb4","type":"ui_button","z":"bbf5094bc59a03b8","name":"","group":"e7248049173432e6","order":1,"width":0,"height":0,"passthru":false,"label":"Enable","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":880,"y":1120,"wires":[["dc814d450f45a513"]]},{"id":"046bd96d83fe934d","type":"ui_button","z":"bbf5094bc59a03b8","name":"","group":"e7248049173432e6","order":1,"width":0,"height":0,"passthru":false,"label":"Disable","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"false","payloadType":"bool","topic":"topic","topicType":"msg","x":880,"y":1160,"wires":[["dc814d450f45a513"]]},{"id":"dc814d450f45a513","type":"change","z":"bbf5094bc59a03b8","name":"","rules":[{"t":"set","p":"enabled","pt":"msg","to":"payload","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":1140,"wires":[["b47974f481265742"]]},{"id":"e7248049173432e6","type":"ui_group","name":"Default","tab":"4416caf9db5c96d9","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"4416caf9db5c96d9","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [7 January 2023 02:06 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/16 "2023-01-07T02:06:33Z")

</div>

It really worked perfectly in your flow.

But I was confused because when you are not at runtime and you disable it, it disappears from the screen.

I apologize.

---

<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: [7 January 2023 09:19 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/17 "2023-01-07T09:19:04Z")

</div>

I can see how that could be confusing. When you disable it in the editor you are effectively removing the node from the flow. When you disable it at run time you are disabling the user access to the node, not removing it from the flow. Ideally there would be different words for the two cases.

---

<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: [7 January 2023 10:24 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/18 "2023-01-07T10:24:18Z")

</div>

> [@Colin](#):
>
> When you disable it in the editor

Now I understood what the OP meant by not appearing in dashboard after disabling,

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/651b5aa734d3ba20e61537de92f1e8607637c73f.png)

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

this is what he meant.

---

<div class="post-metadata">

### Author: ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)
#### Post date: [7 January 2023 23:56 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/19 "2023-01-07T23:56:20Z")

</div>

yes, is this is very confuse!!

---

<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: [21 January 2023 23:56 UTC](https://discourse.nodered.org/t/input-locked-for-user-in-runtime/73139/20 "2023-01-21T23:56:49Z")

</div>

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