Form triggers submit event even if invalid

Hey guys!

Am I right, that the Softr “customizable form” block triggers “submit” events even if the form is invalid?


const formSubmit = Array.from(document.getElementsByClassName("form-inputs"))[0]
formSubmit.addEventListener("submit", function() {console.log("form submitted")});

The console logs the message even if the form submission is invalid i.e. required fields are not filled, error validation messages are shown and the data is not submitted.

For context, I’m trying to set up a Fathom Analytics tracking event for when the user submits a form.

Is this expected behavior, am I doing something wrong or is this a bug? :slight_smile:

Any thoughts on this from someone in Softr? :slight_smile: