How to prevent submitting the same form twice?

I have the submit button of my form tied to a query and I want to prevent multiple submissions until the query finishes (with or without errors) so I added this:


The submit button gets disabled eventually, but not instantaneously. In other words, there’s nothing preventing me from clicking submit several times during the first half second. Is there a way to fix this?

Hi Nacho,

Thanks for bringing this to our attention!
I’ve implemented a feature that allows you to add a timeout.

Once it passes review and tests, I’ll have it out in prod today.


1 Like

To clarify, the new feature (live now) is a setting on the button component to disable the button for X milliseconds after being clicked. You can couple that with that disable setting you have, or just disable it for a set time. We’ll see if we can add that in to the form as well as the button, but at the moment the workflow would be to use a container and a button to get that feature.

Thanks, Alex. This is useful.

A temporary alternative workaround I found yesterday was putting the form in a tabbed container and changing the tab on click (which happens automatically).