Clear form only after multiple queries have run

I am using the values in the form in other queries that are automatically run on submit so I cant use the clear form after submit button initially. How can I clear the form dynamically ? I tried doing this in a javascript transformer like this but It doesn’t work. Any ideas?

Hey Alex! I still think the form.clear function will be the way to go. As you stated you have other queries that run on submission of the form. You can append another Run JS Code query that runs on success of the final query that needs information from the form. That way all queries that are pulling from the form run successfully and the form is cleared afterwards. I’ve attached a couple of screenshots to give you an idea of what I mean.

Hope this helps!