I have a form where users come to submit images via Wix Code user input form that connects to a database.
I have added a custom preloader that suggests to the user their images and form are being uploaded and saved.
I’ve tested the form several times: When all fields are valid, the preloader works, the form saves, the success message appears and I’m redirected to a thank you page.
But when a field is invalid or incomplete, the preloader works, the error message appears, but then both the preloader and error message don’t go away. This means the user can’t correct their form fields and move on.
So, how do I make the preloader disappear after a failure/error message?? Please Help!
Link to the form: www.darkyellowdot.com/submit
I’m not very code literate at all, but I’ve gotten this far. Here’s what my code looks like for the preloader:
export function button1_click(event, $w) {
$w(#box6’).show();
$w(‘#dataset1’).onAfterSave(()=>{
$w(‘#box6’).hide(“fade”);
})