Very rudimentary question here, but, is there a way to create a script to empty a load of text fields on my modal form, when the form closes.
Meaning if /when I update the fields in the form, I only need to update this script?
Or, even more clever - a script that can apply to any modal form? Although I know I'm pushing my luck here, especially given my very shallow coding expertise!
I've tried to use chatGPT to help me here, but I'm drawing blanks.... I think I just need to know the syntax to add to my script to make a textBox = ""
You can clear the form on submit if need be or if not submitting by default and running another query you can use .clear
Thanks @ScottR - that explains it!
I was sure I had this working before and couldn't figure out what had happened.....
It's because I had actually got rid of the form for this modal, and just using text boxes - which is when this option disappears! Yet another reason why we should use a form where possible!
Hello, I read the document.
the form component has a
If all you text fields in the form is using default field name such as
You can use js to rearrange that object, to set all property start with
textInput to "", then set it back to form via `form1.setData(data)
Here is docs
@AnsonHwang - thank's a lot for this, very useful!