TOPIC:

multiple messages sent on submite 3 years 8 months ago #236260

  • geeksscript
  • Offline
  • Senior Member
  • Senior Member
  • Registered
  • Posts: 117
  • 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 3 years 8 months ago #236377

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Platinum Member
  • Platinum Member
  • Registered
  • Posts: 5957
  • Thanks: 558
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.042 seconds

Support Chat

Join our Discord chat and enter the Crosstec channels for live-support, chat forums and interact directly with the community!

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

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

Subscribe to news and updates!

Special Offer

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!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!