TOPIC:

multiple messages sent on submite 1 year 1 month ago #236260

  • geeksscript
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 86
  • Thanks: 1
Hi Mario / Mihaela,

I already have below code running on each page of the website:
<script type="text/javascript">
        window.onbeforeunload = function () {
            var inputButton = document.getElementsByTagName("BUTTON");
            var inputInput = document.getElementsByTagName("INPUT");   
            for (var i = 0; i < inputButton.length; i++) {
                if (inputButton[i].type == "button" || inputButton[i].type == "submit") {
                    inputButton[i].disabled = true;
                }
            }
            for (var j = 0; j < inputInput.length; j++) {
                if (inputInput[j].type == "button" || inputInput[j].type == "submit") {
                    inputInput[j].disabled = true;
                }
            }
        }; 
</script>

Still, 10 records were created for a single submission. I tried reproducing on my end by clicking multiple times on 'Submit' button but record was only created once.

Do I need to add captcha as well or was there anything wrong on the user's computer who submitted the form?

Please guide.

Please Log in or Create an account to join the conversation.

multiple messages sent on submite 1 year 1 month ago #236377

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
Geeksscript,

The script itself is fine and should do the job.
But at the end of your post you said that you could add ReCaptcha to your form wich would be the best solution IMO.

I also have a more simplier script that would disable Submit AFTER submit but ReCaptcha did show as a better solution for this issue.

Can you please add it and let me know if these kind of bulk emails happen again.

Regards,
Mario
The following user(s) said Thank You: geeksscript

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.045 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!