Duplicate contact form submissions: stopping the double click
Duplicates happen when a visitor clicks Send twice, or presses it again because nothing seemed to happen. The fix has two halves: lock the button while the form is sending, and have the server treat an identical message from the same form within a short window as one entry.
Why it happens
- A slow server or mail setup leaves the visitor waiting with no sign of progress.
- Some forms show one error message per click, stacking copies on the page and inviting another click.
- On a phone, a double tap is easy.
- A visitor refreshing the thank-you page can resend the form in plugins that don't redirect after a submission.
Why the browser half isn't enough
Disabling the button with JavaScript stops most double clicks, but not a refresh, a flaky connection that retries, or a visitor with JavaScript off. The server has to recognise a repeat too.
What Mailbag does
Mailbag Contact Form locks the Send button while a message is on its way. On the server, the same content sent to the same form within 60 seconds becomes one entry, not two — so you get one notification and one row in Entries. Without JavaScript, a successful submission ends with a redirect back to the page, so refreshing it doesn't send the form again.
The duplicate check compares the content, not the person, so two different visitors who happen to send the same words at the same moment are still kept apart as long as anything they typed differs, such as their email address.
Checking your current form
Send your form, then press Send again as fast as you can, and try refreshing the page afterwards. Count the entries and the notifications you get. If you get two of either, the double-click problem is live on your site.
Mailbag Contact Form is a free contact form that saves every entry before it sends anything, and shows you what happened to each email.
See what it does