In my custom node i have a button that adds <div class="form-row"> <input type="text" /> </div>
I would want when i press another button that hides/deletes the form row created to change the input value back to "";
Because when i type something on input the value of it stays until i delete it
let myInput = $("#myInput")
btn.on("click",()=> {
myInput.value = ""
}
jQuery remove - to delete an element
jQuery .show() / .hide() to show & hide an element
However, why don't you use the node-red built in widget editableList?
I dont want to remove the element. I already do that in my function. I just want to reset the value to "" everytime i click on the button
jQuery empty
Or $("#myInput").val("");
It still stays until i reopen the node. Why doesnt it just change on button click?
EDIT: you can remove this comment