-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent duplicate applications #97
Comments
Since duplicates arrive seconds apart, it's clear that the problem is clicking the "Apply" button more than once out of impatience, slow connection, etc. The simplest short term solution is to change the label on the Apply button. "Apply (Do not click a second time - wait 1 minute then check your email)." If this works, there's no need for anything fancy. |
I'm thinking of putting in a unique composite index in the database to prevent dupes. Instead of returning an error if they click it a second time, I'm thinking of changing the action to create or update if there's already one like that, so if they do submit a second time, it just updates the application. |
@tibbon I think the best thing to do first would be a javascript-y thing that disables the submit button after it's been clicked. That should cut down on a lot of it. I've got a (possibly unwarranted) concern about doing the restriction by index as I'm afraid it might actually be too heavy a hammer to hit this problem with, but it could be the right thing. I'd have to see the code. But a first stab would definitely be the JS solution and see what that takes care of. |
This is an interesting problem. I would like to take a look at the JS solution and see if that is sufficient. |
My idea is to basically do a basic search against name, email, phone number, and description fields within a time frame - if they're the same, that should be enough to prevent duplication. Also, we can add a state to disable the submit button after it's been clicked.
The text was updated successfully, but these errors were encountered: