Add Loading Screen While Form Upload is in Progress

I have a form that requires six images to be uploaded. When the user clicks the Submit button, it looks like nothing is happening, and can take upwards of 30 seconds.

How can I add some kind of loading spinner while this is happening, that will eventually transition to my “Successful” lightbox?

Many creative ways to do this. My suggestion:

Go to loading.io
Download a loader GIF file
Add the GIF to the page and set it to ‘Hidden on load’
After the user clicks on submit, hide the submit button and show the GIF
Redirect to the Lightbox on success

What event do I use to know when the submission has been completed, and therefore I should show the other lightbox?

@wix88074 My suggestion was given based on the assumption that you are using wixData.insert() to upload items into a database.

If so then use an async/await function on the wixData.insert()

If not then read about it here https://www.wix.com/corvid/reference/wix-data.html

@shantanukumar847 Right now I’m using data-bound fields to do the uploading. Is there anyways to do it without changing that methodology?