# Notification Node Dialog Input field as Password

**URL:** <https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494>\
**Category:** Dashboard\
**Created:** [10 November 2021 09:40 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494 "2021-11-10T09:40:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darwin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/darwin/32/44600_2.png) [@Darwin](https://discourse.nodered.org/u/Darwin)\
**Post date:** [10 November 2021 09:40 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/1 "2021-11-10T09:40:00Z")

</div>

Is it possible to influence the input field in the dialog supported by the notification dialog to be of type "password" instead of "text". Meaning that the input is just shown as \*\*\*\* instead of readable text?

I didn't find an option for that in the help of the node!

Thanks in advance!

---

<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:** [10 November 2021 09:45 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/2 "2021-11-10T09:45:58Z")

</div>

You can use html/javascript in the notification, there is a setting in the node config. You could then possibly create a html form with input type password

---

<div class="post-metadata">

**Author:** ![Darwin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/darwin/32/44600_2.png) [@Darwin](https://discourse.nodered.org/u/Darwin)\
**Post date:** [10 November 2021 10:00 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/3 "2021-11-10T10:00:20Z")

</div>

Thanks for the hint. I am able to get the password field in, let's put styling issues aside for a moment, but how could I include the content of the password field into the msg.payload sent out after clicking ok?

Or would there also be a possiblity to change the input field with the help of javascript to be of type password, which I guess would be the easiest way?

---

<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:** [10 November 2021 13:01 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/4 "2021-11-10T13:01:54Z")

</div>

After a quick google I found this  
[https://paulund.co.uk/style-text-like-passwords-with-css](https://paulund.co.uk/style-text-like-passwords-with-css)  
so you should be able to style the text field.  
There are many posts on the forum about applying css to dashboard elements.

---

<div class="post-metadata">

**Author:** ![Darwin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/darwin/32/44600_2.png) [@Darwin](https://discourse.nodered.org/u/Darwin)\
**Post date:** [2 December 2021 10:37 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/5 "2021-12-02T10:37:03Z")

</div>

Hi thanks for your reply,

I once again tried to use the provided information, but I guess I might miss something. I created a notification node of type "Ok Cancel with Input" to get access to the value the user puts in.

And since it is a password I want the input text to be \*\*\*\* instead of the actual characters they type.

When I try to inject hmtl code in the payload, only the Label for the input can be adapted. How can I inject anything at this position which changes the input node?  
Eg. "Please provide a password", with injected html can be " **Please provide a password**" so I could very much only format that single content and not the input field below right?

Is it possible to use the notification node for such a thing at all?

In case I would use a regular Dialog without an input box I could also add an input field, but what would I need to inject to be able to send the user-provided information in the input field as a message to the output of the node when the user clicks ok?

Sorry if the questions might seem low level. I am just confused how I can make use of the provided information.

---

<div class="post-metadata">

**Author:** ![Darwin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/darwin/32/44600_2.png) [@Darwin](https://discourse.nodered.org/u/Darwin)\
**Post date:** [2 December 2021 10:47 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/6 "2021-12-02T10:47:17Z")

</div>

Hi,

Thanks @E1cid i just figured it out with your link. I initially didn't see how this could work.

To anyone interested, here is the simple node setup:

```auto
[{"id":"e77cb200.c630b","type":"function","z":"6a5dbad.910ae44","name":"Content","func":"return { payload: '<style>input{ -webkit-text-security: disc;}</style>Please enter your password'};","outputs":1,"noerr":0,"x":1140,"y":300,"wires":[["1b706a81.3b20f5"]]},{"id":"1b706a81.3b20f5","type":"ui_toast","z":"6a5dbad.910ae44","position":"prompt","displayTime":"3","highlight":"","sendall":false,"outputs":1,"ok":"OK","cancel":"Cancel","raw":true,"topic":"","name":"","x":1150,"y":340,"wires":[["6fab40ac.711c"]]},{"id":"197655cb.dc703a","type":"inject","z":"6a5dbad.910ae44","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":960,"y":300,"wires":[["e77cb200.c630b"]]},{"id":"6fab40ac.711c","type":"debug","z":"6a5dbad.910ae44","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1340,"y":360,"wires":[]}]

```

---

<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:** [16 December 2021 10:47 UTC](https://discourse.nodered.org/t/notification-node-dialog-input-field-as-password/53494/7 "2021-12-16T10:47:51Z")

</div>

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