Skip to content

Automatically Switch from a Registration Form to a Waitlist in Gravity Forms

Switch a Gravity Forms registration form to a waitlist when it’s full with the Overflow add-on from Gravity Labs, or count attendees with a shortcode when one entry can include several people.

Chris Eggleston 4 min read

Updated October 2026: Gravity Labs now has an add-on that does this for you, so I’ve rewritten this post around it. My shortcode is still here for registrations where one entry can include several attendees.

The Problem

Managing event registrations can be tricky when space is limited. Whether you’re organizing a small workshop, a webinar, or a private appointment schedule, you want to make sure you don’t overbook, but you also want a way to collect waitlist signups the moment capacity is reached.

The Solution: The Overflow Add-On

Overflow is an add-on from Gravity Labs, the Gravity Forms team’s home for add-ons that are still in the test stage. It’s included with any active Gravity Forms license.

Instead of closing the form when it’s full, Overflow keeps your registration form open and saves anything submitted after that to an Overflow List on the same form. That list is your waitlist: people can see their place in line, and you can move them up when a spot opens, by hand or automatically.

Set It Up

  1. Get Overflow from its page in our add-on directory, which links to the download on Gravity Labs (log in with your Gravity Forms account). Install and activate it like any other plugin.
  2. Open the registration form’s Settings and, under Restrictions, turn on Enable Entry Limit with your number of spots. To close registration on a date instead, or as well, turn on Schedule Form.
  3. In the same Restrictions section, turn on Enable the Overflow List and choose Activate on Entry Limit, Activate on Schedule End, or both.
  4. Write the Overflow Confirmation Message. This is what people see when they land on the waitlist, in place of your normal confirmation.
  5. Optionally, turn on queue positions, so each waitlisted entry gets a place in line, and automatic promotion, so the next person moves up when a confirmed entry is trashed or deleted.

With queue positions on, two merge tags tell people where they stand. For example:

The event is full, but you're on the waitlist.
You're number {overflow_position} in line, with {overflow_people_ahead} ahead of you.
We'll let you know if a spot opens up.

Managing the Waitlist

  • The form’s Entries screen gets Confirmed and Overflow List filters, so registrations and the waitlist sit side by side.
  • Use the Move to Confirmed row action to promote one person, or the Promote to Confirmed bulk action for several. Bulk promotion goes in queue order and won’t go past your entry limit.
  • With automatic promotion on, trashing or deleting a confirmed entry promotes the next person in line. Every promotion adds a note to the entry.
  • Developers can hook into promotions with the gform_overflow_entry_promoted action, which receives the entry ID and the form. It’s the place to send a “you’re in” email.

Good to Know

  • Labs add-ons are provided as-is and aren’t covered by Gravity Forms support. Overflow’s first release is an alpha, so try it on a staging site before an event that matters.
  • Raising the entry limit later doesn’t promote anyone on its own. Use the bulk action to move people up.
  • If your entry limit resets each day, week or month, the Overflow List doesn’t reset with it.

When One Entry Can Include Several Attendees

Overflow counts entries, just like the built-in entry limit: one submission takes one spot. If someone can register a group on a single form, a 6-seat event can be overbooked long before it has 6 entries.

For that, my shortcode below still does the job. It counts the attendees in a List field across all entries and shows your waitlist form once the seats are gone.

What You’ll Need

  • One form with a List field to collect attendees
  • A second form for your waitlist
  • The plugin code below, which adds the shortcode
  • The IDs of both forms and the List field

Step-by-Step Instructions

  1. Set up the registration form with a List field where people enter each attendee (names, or name/email pairs). Note the form ID and the List field’s ID.
  1. Create the waitlist form and collect what you need from people who missed the cutoff.
  2. Add the plugin code below. Save it as a file in wp-content/plugins/ and activate it, or paste it into a code snippets plugin. The comments at the top walk through each option.
event-reg-limit-waitlist-form-switch.phpGist by chriseggGitHub
<?php
/**
 * Plugin Name: Event Registration Limiter for Gravity Forms
 * Description: Dynamically switches between a registration form and a waitlist form
 *              based on the actual number of attendees registered.
 * Author: Chris Eggleston – Gravity Ranger
 * Tutorial URL: https://gravityranger.com/automatically-switch-from-a-registration-form-to-a-waitlist-in-gravity-forms/
 *
 * WHERE TO PUT THIS CODE:
 * --------------------------------------------------
 * Choose ONE of the following:
 *
 * OPTION A: Create a small custom plugin
 *   - Create a file called event-registration-limiter.php
 *   - Place it in /wp-content/plugins/
 *   - Paste this entire snippet into the file
 *   - Activate the plugin in WordPress
 *
 * OPTION B: Use a code snippet plugin
 *   - Add this code using WPCode, Code Snippets, etc.
 *   - Ensure the snippet runs on the front end
 *
 * OPTION C: functions.php
 *   - Paste into your active theme’s functions.php file
 *   - Code will be lost if the theme is changed
 *
 * --------------------------------------------------
 *
 * HOW TO USE:
 * 1. Create a registration form in Gravity Forms.
 * 2. Add a LIST field where EACH ROW represents ONE attendee
 *    (ex: First Name | Last Name | Email).
 * 3. Create a separate waitlist form.
 * 4. Place the shortcode on a page and pass the correct IDs.
 *
 * Example shortcode: 
 * [event_form_display registration_form_id="1" waitlist_form_id="2" list_field_id="6" max_attendees="100"]
 */

add_shortcode('event_form_display', function($atts) {

    /**
     * STEP 1: Define shortcode attributes
     *
     * These allow the snippet to be reused for different events
     * without modifying the code.
     */
    $atts = shortcode_atts([
        'registration_form_id' => 1,   // Main event registration form ID
        'waitlist_form_id'     => 2,   // Waitlist form ID
        'list_field_id'        => 6,   // List field ID (each row = 1 attendee)
        'max_attendees'        => 100  // Event capacity
    ], $atts);

    // Cast values to integers for safety
    $registration_form_id = (int) $atts['registration_form_id'];
    $waitlist_form_id     = (int) $atts['waitlist_form_id'];
    $list_field_id        = (int) $atts['list_field_id'];
    $max_attendees        = (int) $atts['max_attendees'];

    /**
     * STEP 2 + 3: Count total attendees across all active entries
     *
     * Each row in the List field represents ONE attendee.
     * GFAPI::get_entries() returns 20 entries per call by default,
     * so we page through every entry instead of only the first 20.
     */
    $search_criteria = array( 'status' => 'active' );
    $total_attendees = 0;
    $page_size       = 200;
    $offset          = 0;

    do {
        $entries = GFAPI::get_entries(
            $registration_form_id,
            $search_criteria,
            null,
            array( 'offset' => $offset, 'page_size' => $page_size )
        );

        if ( is_wp_error( $entries ) ) {
            return '';
        }

        foreach ( $entries as $entry ) {
            $list = maybe_unserialize( rgar( $entry, $list_field_id ) );

            if ( is_array( $list ) ) {
                $total_attendees += count( $list );
            }
        }

        $offset += $page_size;
    } while ( count( $entries ) === $page_size );

    /**
     * STEP 4: Calculate remaining seats
     */
    $seats_remaining = $max_attendees - $total_attendees;

    /**
     * STEP 5: Display the correct form
     *
     * - If the event is full, show the waitlist form
     * - Otherwise, show the registration form with seats remaining
     */
    if ($seats_remaining <= 0) {

        $output  = '<div class="gf-event-message">';
        $output .= '⚠️ Registration is full. You can join the waitlist below:';
        $output .= '</div>';

        $output .= do_shortcode(
            '

Oops! We could not locate your form.

' ); } else { $output = '<div class="gf-event-message">'; $output .= '🎟️ <strong>' . $seats_remaining . '</strong> seat'; $output .= ($seats_remaining > 1 ? 's' : '') . ' remaining. Register below:'; $output .= '</div>'; $output .= do_shortcode( '

Oops! We could not locate your form.

' ); } return $output; });
  1. Add the shortcode where the form should appear, with your own form IDs, List field ID and number of seats:
[event_form_display registration_form_id="248" waitlist_form_id="249" list_field_id="24" max_attendees="6"]

How It Works

  • The shortcode fetches all active entries from the registration form.
  • It counts the rows in the List field across those entries and shows how many seats are left.
  • Once the attendee total reaches your limit, it shows the waitlist form instead of the registration form.

Without an Add-On

If you’d rather not run a Labs add-on and each entry is one person, Gravity Forms can do a simpler version on its own: turn on Enable Entry Limit under Restrictions, and put your waitlist form’s shortcode in the Entry Limit Reached message.

This event is full. Please join our waitlist below in case a spot opens up.

[gravityform id="1" title="false" ajax="true"]

The waitlist then lives in a second form, with no place in line and no promotion, which is exactly what Overflow adds.

Which One Should You Use?

  • One person per entry: use Overflow. One form, a real waitlist, and promotion built in.
  • Several attendees per entry: use the shortcode, so seats are counted by attendee.
  • No add-ons on this site: use the entry limit message with an embedded waitlist form.

Need More Help?

If you still need help, use the chat or leave a comment below and we’ll get back to you.

Comments

Ask a question or leave a comment

Your email is never shown. For help with a specific form, share what you expected and what happened instead.