Double Click submit button

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Double Click submit button

Post by petejos »

Hi there,

I have issue where ppl click the submit button few times while the form is in the process of submitting. Reason being after the person click the Submit button, it take few seconds for my form to progress to a success page. During the time, people thought they have not click so they click the second or third time. What is the best thing I could do to prevent this from happening? Thanks.
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

You can use events to disable the button after it has been clicked.
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

Thanks Pablo. Are you able to give me the javascript to disable? Thanks.
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

You do not need JavaScript.

1. Add an 'onclick' event
2. Set action to 'disable'
3. Set target to 'self'

To make sure that the button still submits, you will also have to:
4. Add another 'onclick' event
5. Set action to 'run JavaScript'
6. JavaScript:

Code: Select all

return true
As documented here:
viewtopic.php?f=10&t=37833
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

Pablo, I am using the BUTTON from the form controls toolbox. In the event for button, i can't see the "disable" in the action list. Do I not use the BUTTON and instead use something else?
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

'disable' should be in the list (WWB17)

Image
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

Hi Pablo,

I have version 15 and I can see the action "disable". However, I did exactly what you said, but now the form doesn't seem to work.

https://goec.com.au/goec3/agm2021.php

could you please help me and let me know what i did wrong?
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

It looks like you have disabled the button in the properties. 'Disabled' should be unchecked.

Note that support for version 15 has ended.
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

I check in the property and it is "false" in disabled.
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

If you need further assistance then please share a DEMO project so I can see all your settings.

Please read this first:
viewtopic.php?f=10&t=82134
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

I cannot load the project because it uses an extension that I do not have.

Please read:
viewtopic.php?f=10&t=82134
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

it is created with version 15. I don't understand what do you mean by extension is incorrect?
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

Pablo,

I think I have done what was instructed to share my project. I am not sure what is wrong. Can you guide me through? Thanks.
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

I cannot open your project because you have used an extension ReferenceeNumber.wbx which I do not have.
You will need to remove all extensions and third party code from your project before sharing it.

But, in the meantime I have done some tests myself and it turn outs the browser will not submit the form if you disable the button. So, my suggestion will not help you.
Alternatively, you can 'hide' the button instead of disabling it. That seems to work.
petejos
 
 
Posts: 152
Joined: Wed Aug 22, 2012 11:43 am

Re: Double Click submit button

Post by petejos »

thanks pablo. Can you try again pls.

https://www.goec.com.au/tempfolder/form.wbs
User avatar
Pablo
 
Posts: 23021
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Double Click submit button

Post by Pablo »

In the meantime, I have done some tests myself and it turn outs the browser will not submit the form if you disable the button. So, my suggestion will not help you.
Alternatively, you can 'hide' the button instead of disabling it. That seems to work.
User avatar
BaconFries
 
 
Posts: 5799
Joined: Thu Aug 16, 2007 7:32 pm

Re: Double Click submit button

Post by BaconFries »

Alternatively instead of adding the event to the button you can try adding it to the form tag instead using the following: changing the text in red with the id of the button
onSubmit="document.getElementById('submit').disabled=true;"
Post Reply