# Clear Input Text after saving information

**URL:** <https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235>\
**Category:** Dashboard\
**Created:** [14 June 2019 13:20 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235 "2019-06-14T13:20:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ylechasseur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ylechasseur/32/6549_2.png) [@ylechasseur](https://discourse.nodered.org/u/ylechasseur)\
**Post date:** [14 June 2019 13:20 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/1 "2019-06-14T13:20:58Z")

</div>

Hi,

I have UI\_Text\_input on my form to get the user to enter information to be saved in MYSQL. When I click on the button SAVE, data are saved, but I want to clear all the text\_input after all by blank data.

What I did to clear them up :

1. With Change Node, I assign an empty string to msg.payload and send it to the UI\_Text\_input. That is working and removing the old date but it displayed **change** in the UI\_Text\_input once applied.

2. I tried the same thing, but instead, sending an empty string, I send **'** or **''.** That's also clean the field but displayed the characters into the Text\_input.

I am trying to find a way to clean the text\_input once the data is saved and so far, can figure it out a good way to do it.

Hope I have been clear

Best

Yves

---

<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:** [14 June 2019 13:49 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/2 "2019-06-14T13:49:40Z")

</div>

Try after you save the data, set msg.payload to "" (blank) and send that to the input of the ui\_text node.  
You might want to add a switch on the output of the ui\_text node to ignore msgs with a blank payload

---

<div class="post-metadata">

**Author:** ![ylechasseur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ylechasseur/32/6549_2.png) [@ylechasseur](https://discourse.nodered.org/u/ylechasseur)\
**Post date:** [14 June 2019 15:09 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/3 "2019-06-14T15:09:43Z")

</div>

Very good idea, I'll give a try and post the result.

Thanks a lot ,

Yves

---

<div class="post-metadata">

**Author:** ![ylechasseur](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ylechasseur/32/6549_2.png) [@ylechasseur](https://discourse.nodered.org/u/ylechasseur)\
**Post date:** [18 June 2019 15:25 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/4 "2019-06-18T15:25:37Z")

</div>

Hi,

The solution works well by sending and empty msg.payload once the data are saved.

thanks a lot

Yves

---

<div class="post-metadata">

**Author:** ![Vishakha](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@Vishakha](https://discourse.nodered.org/u/Vishakha)\
**Post date:** [10 September 2019 05:43 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/5 "2019-09-10T05:43:21Z")

</div>

> [@zenofmud](#):
>
> Try after you save the data, set msg.payload to "" (blank) and send that to the input of the ui\_text node.  
> You might want to add a switch on the output of the ui\_text node to ignore msgs with a blank payload

Hello Sir, could you please send your flow? I also want to do the same thing. I made a form which contains drop downs and text inputs.And after clicking save button i want all the fields to be cleared. I am using the change node to store the data after the button click.  
Thanks,  
Vishakha

---

<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:** [11 September 2019 08:19 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/6 "2019-09-11T08:19:21Z")

</div>

Show me your flow and I see what you have tried

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [11 September 2019 08:21 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/7 "2019-09-11T08:21:33Z")

</div>

Also asked here [Clear the previous Inputs on ui](https://discourse.nodered.org/t/clear-the-previous-inputs-on-ui/15386/4)

---

<div class="post-metadata">

**Author:** ![Vishakha](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@Vishakha](https://discourse.nodered.org/u/Vishakha)\
**Post date:** [11 September 2019 08:58 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/8 "2019-09-11T08:58:19Z")

</div>

[GenFirmware.json](https://discourse.nodered.org/uploads/short-url/4YZa0xvHiJ3POQEC3IxxECaL7EY.json) (73.1 KB)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [11 September 2019 08:59 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/9 "2019-09-11T08:59:34Z")

</div>

There’s no point having two threads for the same issue, it just wastes people’s time

---

<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:** [11 September 2019 09:17 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/10 "2019-09-11T09:17:54Z")

</div>

@Vishakha - since you have two threads going, I will be ignoring anything else in this thread.

---

<div class="post-metadata">

**Author:** ![Vishakha](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@Vishakha](https://discourse.nodered.org/u/Vishakha)\
**Post date:** [11 September 2019 09:20 UTC](https://discourse.nodered.org/t/clear-input-text-after-saving-information/12235/11 "2019-09-11T09:20:51Z")

</div>

Okay sir! no problem. I am new to node red i apologize.
