Change cursor state to waiting while form processing

Issues related to forms.
Post Reply
windsurfer
 
 
Posts: 191
Joined: Mon May 13, 2019 9:15 pm

Re: Change cursor state to waiting while form processing

Post by windsurfer »

When on the submit button on the form is pressed yes, the form does do validation for required inputs though.
I used to have a photographic memory but i ran out of film !!!
User avatar
crispy68
 
 
Posts: 3052
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Change cursor state to waiting while form processing

Post by crispy68 »

My demo form doesn't do anything other than redirect to a success page. As long as it stays on the form page, the progress spinner will be seen until the redirect happens. However, if the validation is incorrect and stays on the page for the user to correct then the spinner will still be seen as the spinner is shown when the submit button is clicked. So technically, the spinner needs to be only shown AFTER validation occurs unless it is redirecting to the error page. This will be a bit more complicated then and I don't think can be done just by using a simple event.
User avatar
protectourlands
 
 
Posts: 428
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Change cursor state to waiting while form processing

Post by protectourlands »

Crispy

Thank you for offering this demo. I tried this by adding an event to my submit button and the spinner shows perfectly, however the form does not process and go to the success page with the event applied to the submit button. When I remove the event the form works fine. Any ideas why?

I notice you added the spinner in a layer. Is this required? I just added the spinner image by itself. Thank you
User avatar
protectourlands
 
 
Posts: 428
Joined: Sat May 24, 2008 2:16 am
Contact:

Re: Change cursor state to waiting while form processing

Post by protectourlands »

OOOPS! Nevermind. Sorry, I just read Pablo's explanation that adding an event overides the submit function.

Works perfectly now. I added the javascript return true; per Pablo's directions. Thank you Crispy and Pablo!
Post Reply