How to Enforce Quantity Limits on Your Forms

Control capacity and prevent overbooking automatically by setting quantity limits that track availability in real-time across signups, products, appointments, and event registrations.

Build Time & Skill

10-15 min

Beginner

What you'll learn

Four quick methods to control form submission quantities and prevent overbooking

Control capacity and prevent overbooking automatically by setting quantity limits that track availability

Managing capacity manually creates headaches. You’re constantly checking spreadsheets to see if you’ve oversold tickets, double-booked appointments, or promised inventory you don’t have. By the time you notice you’ve hit your limit, you’re already dealing with frustrated customers and scrambling to recover.

With Cognito Forms’ quantity limits, you automate the entire process. The system tracks availability in real-time, prevents submissions when limits are reached, and displays clear error messages, so customers know exactly what’s available. Quantity limits work well for:

  • Events with limited seating or capacity, where each performance, date, or session has its own attendance cap.
  • Product inventory management, tracking how many units remain for each item in your catalog.
  • Appointment scheduling with capacity constraints, limiting how many people can book each timeslot.
  • Limited-time offers or exclusive access, controlling how many people can claim special promotions or discount codes.

Understanding Quantity Limits

Quantity limits control how many times a specific value can be selected or entered on your forms. When someone selects a limited option, Cognito Forms immediately checks availability. If the limit hasn’t been reached, the selection goes through. If capacity is full, the form displays your custom error message and prevents submission.

For complete technical details on quantity limit settings, calculations, and supported field types, see the Set & Track Quantity Limits user guide.


Four Ways to Use Quantity Limits

Quantity limits adapt to countless business scenarios. Here are four common examples showing how to apply them to events, tickets, appointments, and promotions.

Method 1: Limit Event Signups

Control attendance for events, workshops, or activities with fixed capacity. This straightforward approach works when you need a simple yes/no signup with a specific attendee cap.

When to use this: Single events with one capacity limit, like pre-event dinners, exclusive workshops, or VIP experiences where everyone who says “yes” counts toward the same total.

Create your form and add basic fields

  1. Create a new form and name it “Event Registration”, or use our free Signup Limits template. Consider adding fields like:
    • Name field to capture attendee information
    • Email field for confirmation notifications
    • Phone field for event updates
  2. Add a Yes/No field for attendees to sign up.

Specify and track quantities

  1. Configure quantity limits on the Yes/No field:
    • Set Limit Quantity to Specific Quantity
    • Set Quantity to your attendee limit (like 50 or 100)
    • Write a custom error message (ex: “The pre-event dinner has reached capacity!”)
  2. Optionally, add a Calculation field set to =SignupField_QuantityRemaining to display the remaining capacity in real-time. Make sure to replace SignupField with the name of your Yes/No field.

Set Specify Quantity to allow 50 attendees.

Once your limit is reached, anyone trying to sign up sees your error message and cannot submit. If someone cancels their registration (and you delete their entry), a spot automatically opens up.

Ready to implement signup limits?

Learn how to create a complete event registration system in How to Limit the Number of Submissions on a Form.


Method 2: Manage Limited Ticket Sales

Sell tickets for performances, events, or experiences with different seating types and varying availability across multiple showtimes. This method tracks quantities for each unique combination of performance time and seat type.

When to use this: Events with multiple performances and ticket tiers, like theater shows, concerts, or conferences where Friday night premium seats have different availability than Saturday matinee standard seats.

Create your form and add basic fields

  1. Create a new form and name it “Ticket Sales”, or use our free Ticket Sales template. Consider adding fields like:
    • Name field to capture ticket holder information
    • Email field for ticket confirmation
    • Phone field for order updates
  2. Add a Repeating Section labeled “Tickets” to allow multiple ticket purchases.
  3. Inside the Repeating Section, add the following fields:
    • Textbox field (set to Single Line) labeled “Name on Ticket”
    • Choice field labeled “Ticket Class” to select the ticket class (Premium, Standard, Basic)
    • Choice field labeled “Performance” to select a performance (Friday night, Saturday matinee, Saturday night)
    • Calculation field (set to Text type) to track unique performance-seat combinations
      Add a Repeating Section to allow multiple ticket purchases.

Specify and track quantities

Specify quantities for each seat type

  1. Select the “Ticket Class” Choice field and check Limit Quantities under Choice Options, then specify quantities for each seat type.
  2. In the Calculation field settings:
    • Set Calculation to =Performance + "-" + TicketClass
    • Set Show This Field to For Roles > Internal (this hides the tracking calculation from customers)
  3. Configure quantity limits on the Calculation field:
    • Set Limit Quantity to Specific Quantity
    • Set Quantity to =TicketClass_Quantity
    • Write a custom error message (ex: “Sorry, there are no more seats available for the selected ticket class.”)

This setup creates separate quantity tracking for each performance-seat combination. When someone selects “Friday night” and “Premium,” the system checks availability specifically for Friday night premium seats – not just total premium seats across all performances.

Limit quantites for each ticket class and performance date.

Need to collect payment with your tickets?

Discover how to use advanced payment and ticketing features in How to Build Event Registration Forms That Accept Payment.


Method 3: Control Appointment or Class Timeslots

Manage bookings for classes, appointments, or services where the same offering is available on multiple dates with limited spots per session. This method prevents double-booking by tracking capacity for each unique date-class combination.

When to use this: Recurring classes, appointment scheduling, or services offered multiple times per week where each session has its own capacity limit—like yoga classes, tutoring sessions, or equipment rentals.

Create your form and add basic fields

  1. Create a new form and name it “Class Registration”, or use our free Appointment Booking template. Consider adding fields like:
    • Name field to capture participant information
    • Email field for class reminders
    • Phone field for last-minute updates
  2. Add a Choice field containing a list of classes or services (Yoga, Zumba, Pilates).
  3. Add a Date field for participants to select when to attend.
    • Optionally, add a Custom Error to the Date field, limiting selections to available days (like Tuesdays and Thursdays only): =(Date.DayOfWeek != "Tuesday" and Date.DayOfWeek != "Thursday")
      Limit date selections to Tuesdays and Thursdays.

Specify and track quantities

  1. Add a Calculation field to create unique date-class combinations:
    • Set Calculation to =Class + Date
    • Set Show This Field to For Roles > Internal
  2. Configure quantity limits on the Calculation field:
    • Set Limit Quantity to Specific Quantity
    • Set Quantity to your capacity per session (like 20 attendees)
    • Write a custom error message (ex: “Class is full on this date.”)

The Calculation field combines the selected class with the chosen date, creating entries like “Yoga 2025-03-15” or “Pilates 2025-03-17.” Each unique combination gets its own quantity tracker, so Yoga on March 15 can fill up while Yoga on March 17 still has openings.

Limit the number of bookings for classes on different dates.

Building more sophisticated booking systems?

Learn advanced techniques for connected availability in How to Create a Booking Form with Connected Availability.


Method 4: Track Limited-Use Discount Codes

Control how many times promotional codes can be redeemed across all form submissions. This method validates discount codes and prevents overuse while applying the appropriate discount to payment totals.

When to use this: Limited promotions, early-bird specials, or exclusive offers where you want to cap total redemptions—like “first 20 customers get 20% off” or partner codes with usage limits.

Create your form and add basic fields

  1. Create a new form and name it “Order Form”, or use our free Order Form template. Consider adding fields like:
    • Name field to capture customer information
    • Email field for order confirmation
    • Choice field or Repeating Section for product selection
  2. Add a Textbox field (Single Line) to capture the discount code.

Specify and track quantities

  1. In the Textbox field settings, set up the quantity limit for the discount code:

    • Set Limit Quantity to Specific Quantity
    • Set Quantity to =if DiscountCode = "SUNDRIED" then 20 else if DiscountCode = "SCOTFREE" then 10 else null
    • Write a custom error message (ex: “This discount code has expired!”)
      Set up the quantity limit for the discount code.
  2. Next, set up the custom error for the discount code:

    • Set Show Custom Error to When
    • Show the custom error when DiscountCode is filled out and DiscountCode_QuantityLimit is not filled out
    • Write a custom error message for invalid codes (ex: “Invalid discount code!”)
  3. Add a Price field to calculate and apply the discount.

    • For percentage discounts, multiply the payment total by the percentage: =if DiscountCode = "SUNDRIED" then -ItemTotal * 0.20 else if DiscountCode = "SCOTFREE" then -ItemTotal * 0.10 else 0
      Use a Price field to calculate the discount.

When calculating discounts, reference actual payment fields on your form (like PaymentField1 + PaymentField2) rather than Order.SubTotal. The order subtotal automatically changes once a discount is applied, which would make your discount calculation inaccurate.

This setup tracks how many times each code has been used across all submissions. When “SUNDRIED” reaches 20 redemptions, anyone trying to use it sees your error message. The system validates codes in real-time and automatically applies the correct discount percentage to the payment total.

Display an error when the discount code quantity is exceeded

Managing multiple discount codes?

Learn advanced techniques for organizing and maintaining discount code libraries in How to Set Up Limited-Use Discount Codes.


Start Enforcing Quantity Limits Today

Manual capacity tracking creates bottlenecks, disappointed customers, and constant administrative work. With Cognito Forms’ quantity limits, you automate the entire process—setting clear boundaries that the system enforces automatically while giving customers transparent information about availability.

Whether you’re managing event registrations, product inventory, appointment bookings, or promotional campaigns, quantity limits transform how you handle capacity. Set your limits once, and let the system handle the rest.

Start with a customizable template

Get a head start with our pre-built quantity limit templates. Our Signup Limits, Ticket Sales, Timeslot Limits, and Limited Use Discount Codes templates already include quantity tracking, ready to customize for your specific capacity needs.


FAQ