Streaming live at 10am (PST)

Close pop up modal after success form state

I currently have a popup model designed to close when an X is clicked. I would like to have the modal also disappear after a user submits the form successfully after a few seconds.

I have an animation set up from the submit button, however if there is an error on the form, the pop up still closes after a few seconds, not allowing the user time to fix the error.

This can only be achieved with custom code as there is no callback function in interactions.

I’ve added a Div behind the form which if clicked removes the form and instruct the user to click away this way. Would be amazing if someone could share what the code should look like.