# Help with \`text input\` node

**URL:** https://discourse.nodered.org/t/help-with-text-input-node/68668
**Category:** General
**Created:** [7 October 2022 10:18 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668 "2022-10-07T10:18:53Z")
**Posts on this page:** 6
**Page:** 1

<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: [7 October 2022 10:18 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668/1 "2022-10-07T10:18:53Z")

</div>

I'm working on a small project just to keep myself busy.

I have a `text input` node.

Normally it is `disabled`.

When `enabled` (for a short time) the user enters text.  
After that time the node is `disabled`, and the text entered is retained. ☹

How can I _wipe_ the text?  
If I send a `msg.payload == " "` it messes up the next time the node is enabled as it has (_remembers_) the space sent previously.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [7 October 2022 10:21 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668/2 "2022-10-07T10:21:45Z")

</div>

> [@Trying\_to\_learn](#):
>
> If I send a `msg.payload == " "` it messes up

Have you tried

`msg.payload = ""`

---

<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: [7 October 2022 10:24 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668/3 "2022-10-07T10:24:21Z")

</div>

How do I do that in a `change` node?

I _fear_ that if I make msg.payload `text` and put `""`, I will get just that.

## Update:

So I set it with `J:` (expression) - yes?

---

<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 October 2022 10:30 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668/4 "2022-10-07T10:30:17Z")

</div>

In the change node, leave the value blank  
 ![Screen Shot 2022-10-07 at 6.29.16 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/a/5a99d3f2bc1248c06c8842bf4691ae2d35cdd754.png)

and it is easy enough to test...

```auto
[{"id":"663ce662753eca2f","type":"change","z":"ea4605c08dd40eb0","name":"Refresh Browser","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"},{"t":"delete","p":"socketid","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":240,"wires":[["61d5cc7260ed2658"]]},{"id":"61d5cc7260ed2658","type":"debug","z":"ea4605c08dd40eb0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":240,"wires":[]},{"id":"32c524c6e4f3d416","type":"inject","z":"ea4605c08dd40eb0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"blah","payloadType":"str","x":370,"y":240,"wires":[["663ce662753eca2f"]]}]

```

---

<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: [7 October 2022 10:37 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668/5 "2022-10-07T10:37:14Z")

</div>

Thanks.

Silly me. I didn't think of that.

Works.

---

<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 October 2022 10:38 UTC](https://discourse.nodered.org/t/help-with-text-input-node/68668/6 "2022-10-21T10:38:07Z")

</div>

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