I am looking to set up a form where the submit button is disabled initially. The user has to click the 'validate form' button which has a javascript query in the background. If that javascript query returns true, then the submit button on the form becomes enabled, otherwise it remains disabled.
How do I do that? I currently set the disable form submission component to true to make disable it by default but how do I turn it to false depending on the output of my javascript query?
Hi @et_retool! In your "Disable form submission" field, you can use double curly braces to put in dynamic values.
For example, if your JS query is returning true and you'd like to enable the form, you can use {{ !jsQuery1.data }} in your "Disable form submission" field.
Hello, I know this is an old question but this is what I found when searching for an answer and thought I could help out, if only anyone else looking for a solution.
What we ended up doing for forms is
Create a Form and Enable validation and enable submit.
Do not add a mutation or backend call to submit data to the form event handlers so that we can validate on pressing enter
Add a button somewhere and add a mutation or backend call to submit data that saves it