Change cursor state to waiting while form processing
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
Change cursor state to waiting while form processing
I'm sure this has been asked before, but I cannot find an answer that seems to work for me. Does anyone have a working method for changing the cursor to 'waiting' or 'busy' state while a form is processing?
I am using a standard form, with a standard Submit button using built-in PHP form processing. A confirmation page is displayed once processing is complete. Everything works great, but my users get inpatient and keep pressing the submit button when they don't see the browser page is active. (Sometimes I get the same information posted 5 or 6 times!) The main culprit is that the cursor has not changed after the initial submit to indicate that something is in process. I need something ... some indicator that the submit is active and processing. Anytime I put anything in the Events for the button, it overrides the submit and doesn't process.
I've tried using CSS (body.waiting * { cursor: wait; }), JavaScript (document.body.className = 'waiting';), changing the button state, but nothing works gracefully.
Does anyone have a proven solution that they use regularly?
Thanks in advance for your help!!
I am using a standard form, with a standard Submit button using built-in PHP form processing. A confirmation page is displayed once processing is complete. Everything works great, but my users get inpatient and keep pressing the submit button when they don't see the browser page is active. (Sometimes I get the same information posted 5 or 6 times!) The main culprit is that the cursor has not changed after the initial submit to indicate that something is in process. I need something ... some indicator that the submit is active and processing. Anytime I put anything in the Events for the button, it overrides the submit and doesn't process.
I've tried using CSS (body.waiting * { cursor: wait; }), JavaScript (document.body.className = 'waiting';), changing the button state, but nothing works gracefully.
Does anyone have a proven solution that they use regularly?
Thanks in advance for your help!!
Re: Change cursor state to waiting while form processing
Normally, a form is processed instantly and there is no need to wait. The email is sent by the server, not by the browser.
But if you want to prevent the button from being pressed multiple times then why not disable it after the first click?
This can be done with events.
But if you want to prevent the button from being pressed multiple times then why not disable it after the first click?
This can be done with events.
- BaconFries
-
- Posts: 5653
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Change cursor state to waiting while form processing
See the followingAnytime I put anything in the Events for the button, it overrides the submit and doesn't process.
https://wysiwygwebbuilder.com/forum/vie ... 10&t=37833
Re: Change cursor state to waiting while form processing
I have tried this using the CLICKED event, but I lose the form submit. Perhaps I am not thinking of a workaround using other events? I will take a look at the link supplied by BaconFries to see if there is any help there. Thanks for the prompt reply.Pablo wrote: ↑Fri Dec 16, 2022 7:25 am Normally, a form is processed instantly and there is no need to wait. The email is sent by the server, not by the browser.
But if you want to prevent the button from being pressed multiple times then why not disable it after the first click?
This can be done with events.
Re: Change cursor state to waiting while form processing
This behavior is documented here:I have tried this using the CLICKED event, but I lose the form submit.
https://wysiwygwebbuilder.com/forum/vie ... 10&t=37833
-
-
- Posts: 189
- Joined: Mon May 13, 2019 9:15 pm
Re: Change cursor state to waiting while form processing
I have a form where clients can send me files via email.
I would like to show a progress bar when the submit button is pushed.
I have
onclick javascript return true ;
onclick Enable upload_animate
It will submit the form but it won't show the spinner.
I initially hide the spinner on the page
Can that be done ?
I would like to show a progress bar when the submit button is pushed.
I have
onclick javascript return true ;
onclick Enable upload_animate
It will submit the form but it won't show the spinner.
I initially hide the spinner on the page
Can that be done ?
I used to have a photographic memory but i ran out of film !!!
Re: Change cursor state to waiting while form processing
Displaying a progressbar will not work, because the form is processed in the server. There is no way to get the status from the server.
-
-
- Posts: 189
- Joined: Mon May 13, 2019 9:15 pm
Re: Change cursor state to waiting while form processing
So i can't create an event after i push the submit button ?
I used to have a photographic memory but i ran out of film !!!
Re: Change cursor state to waiting while form processing
I'm curious, why is it taking so long for your form to process to where you would even need a progress bar? The forms I've created all seem to process very quickly. Could it be a server issue?
-
-
- Posts: 189
- Joined: Mon May 13, 2019 9:15 pm
Re: Change cursor state to waiting while form processing
People can attach up to 10 files so it may take some time to process, so would be nice to have a progress bar or some indication that the form is processing.
I used to have a photographic memory but i ran out of film !!!
Re: Change cursor state to waiting while form processing
Yes, you can, but there is no progress update, so it will have no use.So i can't create an event after i push the submit button ?
Alternatively, you can take a look at this:
http://wysiwygwebbuilder.com/fileuploader.html
http://wysiwygwebbuilder.com/dropzone.html
Re: Change cursor state to waiting while form processing
Ok thanks. That makes sense.
-
-
- Posts: 189
- Joined: Mon May 13, 2019 9:15 pm
Re: Change cursor state to waiting while form processing
Yes i looked at those but they upload the files to the server. I need them emailed to me.
I used to have a photographic memory but i ran out of film !!!
-
-
- Posts: 189
- Joined: Mon May 13, 2019 9:15 pm
Re: Change cursor state to waiting while form processing
I added dropzone to my contact us form but after selecting a file it won't send the email or upload to the server. also fileuploader does the same.
I the form properties advanced i selected the mail engine as sendmail. and file upload to the folder upload and the folder is on the server.
I looked at the help file but there is not much there for instructions.
I the form properties advanced i selected the mail engine as sendmail. and file upload to the folder upload and the folder is on the server.
I looked at the help file but there is not much there for instructions.
I used to have a photographic memory but i ran out of film !!!
Re: Change cursor state to waiting while form processing
dropzone is form by itself so it should not be part of another form.
There is no script with a progressbar to email the file, so if you need that then you will have to implement it yourself.
There is no script with a progressbar to email the file, so if you need that then you will have to implement it yourself.
-
-
- Posts: 189
- Joined: Mon May 13, 2019 9:15 pm
Re: Change cursor state to waiting while form processing
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 !!!
Re: Change cursor state to waiting while form processing
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.