How to Limit Form Submissions in WordPress (Free Fixes)

You built a form for a giveaway, a workshop with 30 seats, or a staff survey, and now you need it to stop. Stop after one entry per person. Stop at 30. Stop on Friday at 5 pm. Most form plugins don’t do any of that out of the box, which is why the same question keeps turning up in support forums, worded slightly differently each time.
On the Ninja Forms forum it’s “One Ninja Form per subscriber”. The person had already found the total cap and the login restriction, but wanted each subscriber to submit exactly once. The thread got zero replies. Elsewhere it’s “Limit to one submit per user” or “Limit the number of form submissions based on previous user submissions”. Same itch.
So here’s what actually works, starting with the free and manual options, and where each one falls short.
First, decide what “limit” means for your form
There are really three different problems hiding under one search:
- A total cap. The form closes after N entries. Event seats, limited stock, the first 100 sign-ups.
- A per-person cap. Each person gets one go (or three). Contests, votes, surveys, applications.
- A time window. The form opens on a date and closes on a date. Applications rounds, early-bird offers, RSVP deadlines.
The total cap and the time window are easy to get right. The per-person cap is the hard one, because the web doesn’t really know who a “person” is. You have to pick something to count by, and every choice has a hole in it. We’ll come back to that.
Free fix 1: close the form by hand
Not glamorous, but it works. When you hit your number or your date, unpublish the page or swap the form for a “Registrations are closed” paragraph. For one or two limited forms a year, this is honestly fine.
The catch: you have to be there. A popular giveaway can blow past 100 entries overnight, and a midnight deadline means someone awake at midnight.
Free fix 2: require people to log in
If your form is for members, customers or staff, requiring a WordPress login is the most reliable way to identify a person. One account, one identity. Most form plugins have a “logged-in users only” option somewhere, and if yours doesn’t, you can put the form on a page protected by a membership plugin.
Login alone doesn’t limit anything, though. It tells you who submitted; you still need something that refuses the second entry. And asking the public to register first costs you a lot of entries, so this suits forms where the audience already has accounts.
Free fix 3: Contact Form 7 with a validation snippet
Contact Form 7 has no limit setting at all: no total cap, no schedule, no per-user rule. It also doesn’t store submissions by default (we covered that in does Contact Form 7 store data?), so there’s nothing built in to count against.
The usual answer is a small code snippet. CF7 runs a filter for each field type during validation, wpcf7_validate_{type}, and you can mark a field invalid from there. The sketch below allows one submission per email address, per form. It records a hash of each email after the mail is sent, and refuses a repeat at validation time. It assumes a required email field named your-email (the CF7 default), so change the name if yours differs.
// Contact Form 7: one submission per email address, per form.
// Assumes a required field: [email* your-email]
add_filter( 'wpcf7_validate_email*', function ( $result, $tag ) {
if ( 'your-email' !== $tag->name ) {
return $result;
}
$submission = WPCF7_Submission::get_instance();
if ( ! $submission ) {
return $result;
}
$form_id = $submission->get_contact_form()->id();
$email = strtolower( trim( (string) $submission->get_posted_data( 'your-email' ) ) );
$used = get_option( 'cf7_used_emails_' . $form_id, array() );
if ( $email && in_array( md5( $email ), $used, true ) ) {
$result->invalidate( $tag, 'This email address has already been used.' );
}
return $result;
}, 20, 2 );
add_action( 'wpcf7_mail_sent', function ( $contact_form ) {
$submission = WPCF7_Submission::get_instance();
if ( ! $submission ) {
return;
}
$email = strtolower( trim( (string) $submission->get_posted_data( 'your-email' ) ) );
if ( $email ) {
$key = 'cf7_used_emails_' . $contact_form->id();
$used = get_option( $key, array() );
$used[] = md5( $email );
update_option( $key, array_values( array_unique( $used ) ), false );
}
} );
Put it in a small custom plugin or a code snippets plugin, not in a theme you’ll update. Then test it on a staging copy first. Some honest limits:
- It only counts submissions whose mail actually sent. If mail fails, the email isn’t recorded.
- Anyone with a second inbox, or a plus alias like
[email protected], gets another go. Per-email limits stop casual repeats, not determined ones. - The list lives in one option row. Fine for a few thousand entries, not something to run forever on a busy form.
- A total cap or a date window needs more code of the same kind. At that point you’re maintaining a small plugin of your own.
If you’re writing more and more glue code around CF7, it may be time to look at a Contact Form 7 alternative that has these settings built in.
A word about limiting by IP address
Lots of tutorials suggest “one submission per IP”. It’s blunt. Everyone in one office, school, library or café usually shares a single public IP, and so do big chunks of mobile networks. Set an IP limit of one and the second person in the office gets told they’ve already entered. Meanwhile a single person can switch from Wi-Fi to mobile data and get a fresh address in ten seconds.
IP limits are OK as a loose backstop against someone hammering the submit button. Just don’t set them to 1 on a public form and expect fairness.
What the big form plugins offer
A quick, checked look at a few popular builders:
- WPForms. Entry limits, per-person limits (by email address or IP), scheduling and login restriction all come from the Form Locker addon. WPForms’ own guide says it needs “WPForms Pro or higher, since Form Locker is a Pro addon.”
- Fluent Forms. Its free version has a Scheduling and Restrictions section with a maximum number of entries (with a time interval) and open and close dates.
If you already use one of these, check whether the limit you need is in your tier before adding code.
Trinity Forms: limits and scheduling in the free version
Full disclosure: Trinity Forms is ours. Everything below is in the free version, on the Restrictions tab of the form editor.
Schedule. Set when the form Opens and when it Closes, each with a date and time and its own message (“Message before it opens”, “Message after it closes”). It uses your site’s timezone, so “Friday 17:00” means Friday 17:00 where your site says you are.
Entry limits. Three counters, and 0 means unlimited:
| Setting | What it counts |
|---|---|
| Total entries | All entries for the form |
| Per logged-in user | Entries from one WordPress account |
| Per IP address | Entries from one IP |
There’s a “Message when full” for the total cap and a “Message when you’ve already submitted” for the per-person ones. Spam and trashed entries don’t count towards the limit, so if you delete an entry, its slot opens up again. The limits are checked on the server when a submission arrives, not just by hiding the form, so a stale tab or a script posting directly still gets turned away.
Two honest caveats. The per-IP limit only works when the form stores IP addresses; if you’ve switched on the per-form option not to store IPs, there’s nothing to count. And the editor itself warns you that per-IP is “Blunt: everyone behind one office router or mobile network shares an address.” There’s also no per-email-address limit. If “one per email” is what you need, the snippet approach above is closer.
For the strongest per-person rule, turn on Require login (only logged-in users can see and submit the form, and logged-out visitors get your message) and set “Per logged-in user” to 1. If you want those users to see what they sent afterwards, we wrote up how to show users their own form submissions.
Trinity Forms needs PHP 8.2 or newer. It’s a free download from our site.
Which approach to pick
- Members or staff, one entry each: require login plus a per-user limit. It’s the only per-person rule that’s hard to dodge.
- Public giveaway: per-email is friendliest, and aliases will get through. Avoid IP = 1.
- Seats, stock or deadlines: a total cap or a schedule with a clear “closed” message.
Frequently asked questions
Can I limit a WordPress form to one submission per person without a plugin?
Partly. With Contact Form 7 you can add a validation snippet that refuses a repeat email address, but people with a second address get through. For a firm one-per-person rule you need logged-in users and a per-user limit.
Is limiting submissions by IP address a good idea?
Only as a loose backstop. Offices, schools and mobile networks put many people behind one IP, so a limit of one blocks innocent visitors, while one person can switch networks and get a new IP in seconds.
Do deleted or spam entries count towards a form’s entry limit?
It depends on the plugin. In Trinity Forms, spam and trashed entries don’t count, so deleting an entry frees its slot. Check your own plugin’s documentation before you rely on it for limited seats.