Clear Dynamically Form UI

I Want To Clear Form Manually.
My Form Contain 2Textinput ,UserName And Password.
I Want Clear UserName and Password In The Form Manually When Accept Password.

From the output of the form node, wire in a change node which sends msg.UserName = '' and msg.Password = ''. Might need a switch node after the form as well to ignore any blanks that get passed through depending on how it works.

1 Like

Thanks For Reply
I'll test and give you the answer.


The Result Display In Debug Node == Undefined

I think you want it the other way round.. Set msg.user to msg.payload. As that button will only send a payload (and maybe a topic)

I Want Clear The Form ui Manually
payload Button is == ""
But Not Working and Form Not Clear
My From Contain 2textInput User And Pass
I Want Clear User And Pass Textinput On Form

It doesn't seem to work on the form node.

I prefer using the text input ones, then using my own buttons etc.

The flow below shows how to do this with a text input form.

[{"id":"4b1c894e.d283b8","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"b2971630.6e5108","type":"ui_button","z":"4b1c894e.d283b8","name":"","group":"b98a1e99.eaab7","order":5,"width":"6","height":"1","passthru":true,"label":"Clear","tooltip":"","color":"","bgcolor":"","icon":"close","payload":"' '","payloadType":"str","topic":"","x":290,"y":100,"wires":[["612b7dcd.8bc004"]]},{"id":"98626d19.9b811","type":"ui_text_input","z":"4b1c894e.d283b8","name":"","label":"Scan ID Card Barcode","tooltip":"","group":"b98a1e99.eaab7","order":3,"width":"6","height":"1","passthru":true,"mode":"text","delay":"1","topic":"","x":680,"y":100,"wires":[[]]},{"id":"612b7dcd.8bc004","type":"change","z":"4b1c894e.d283b8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":100,"wires":[["98626d19.9b811"]]},{"id":"b98a1e99.eaab7","type":"ui_group","z":"","name":"Default","tab":"d1f0aded.08bff","disp":true,"width":"6","collapse":false},{"id":"d1f0aded.08bff","type":"ui_tab","z":"","name":"test","icon":"dashboard","disabled":false,"hidden":false}]
1 Like

Thanks for your Reply I found the answer...

What was the solution?

This is the solution:

You can do this to explicitly clear the form by using this in a function node:


return msg;