How do I clear module inputs on form save/submitted?

You can set up your module with a dummy query that watches for an input as mentioned in this thread.

  1. Create an input in the module and set the value to be the parent query or the parent input that you want to use to trigger the module query
  2. (a) Query JSON with SQL dummy query (b) select * from - this watches for changes to input1 and triggers this query on any changes (c) trigger target module query on success

Then in your parent app, just make a change to whatever you set input1 to (in the module) and you should see the module query get triggered!

In your case, the query that you're triggering with the dummy will be a JS query that actually clears the input fields and you'll want to add an event handler to the form in your parent app that prompts the input for the module to recalculate.

As I mentioned before it's a bit tricky to get working at the moment :sweat_smile: let me know if anything could use clarification!

1 Like