Copy link to clipboard
Copied
I currently have two buttons on my form. One to clear the entire form and another to only clear certain fields. I have added a validation code to ask the user if they saved the form yet. However I have yet to find a way to skip the next action which is the built in "reset form". I have entered a similar validation on the other button but this is easily done since its purpose is to clear the entire thing. Any help would be great thanks!
Copy link to clipboard
Copied
You have to reset the form (or part of it) using JavaScript. You can't use conditional logic with any other kind of action.
Copy link to clipboard
Copied
So unfortunately the only way to clear part of the form is to code in every field that I don't want cleared?
Copy link to clipboard
Copied
No... You need to write a script that resets the fields you want to clear. It would look something like this:
this.resetForm(["Field1", "Field2", "Field3"]);
Copy link to clipboard
Copied
Okay that's what I was dreading as this is a very involved project but that will work. Thank you again!