/    Sign up×
Community /Pin to ProfileBookmark

Form Submissions Replicates

I have a request info form on my website and I often get duplicates of the same form, I’m guessing this is from people clicking the submit button two times, is there a way to prevent this from happening?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerDec 10.2007 — Duplicates or spam? If it's spam, then add some validation to your form, client-side and server-side and that should stop the problem. Or add a(n) captcha service to your web form.

Here's one that works well:

http://www.webspamprotect.com/
Copy linkTweet thisAlerts:
@cdp103188authorDec 10.2007 — No, not spam, in fact I have had very little to no problem with spam thus far. The problem is legitimate leads coming in two or three times at the exact same time stamp (within a few miliseconds).

My assumption is that people are clicking the submit button more than once because they are either accustomed to double-clicking on everything or because they have slow enough internet that the form takes a minute to refresh and send them to a thanks page.

Is there a way to maybe dim the submit button and make in non-clickable upon the first click or something?
Copy linkTweet thisAlerts:
@ryanbutlerDec 10.2007 — Is there a way to maybe dim the submit button and make in non-clickable upon the first click or something?[/quote]

I believe there is, but I don't know the code off the top of my head, I'd suggest Google. I still find it hard to believe legitimate leads are coming in twice, or three times, but stranger things have happened.
Copy linkTweet thisAlerts:
@masterkeyDec 11.2007 — yea you can disable form elements using javascript

document.getElementById('some_form_element').disabled = true;

But... are you sure they're hitting the submit button multiple times, or are you redirecting them around in some way such that if they hit the back button, it submits the form again? Are you submitting the form via GET or POST?
Copy linkTweet thisAlerts:
@cdp103188authorDec 11.2007 — I am submitting the form via POST, it actually posts the data back to itself and processes it from the same page and sends it and then redirects them, I could post the code on here if it would be helpful in figuring out what is happening.
×

Success!

Help @cdp103188 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...