We’re thrilled to announce that you can now set quantity limits on your forms! You can use quantity limits for product orders, ticket sales, signups, reservations, and just about any other scenario for which there’s a limit to the number of times a specific value may be selected.

Setting Limits

To get started, open up the form builder and select a supported field type. In the field settings, you’ll find the Limit Quantity option; here, you can select No Duplicates to limit the quantity allowed to just one, or Specific Quantity to specify a quantity limit greater than one.

For example, to limit people to just one submission per email address, set the quantity limit of an Email field to No Duplicates. Then, write a custom error message to display when someone tries to enter the same email address more than once:

An error message indicating that an email address is already registered.

Quantity limits are also essential for managing product inventory. To set quantities for different products, select Limit Quantities from the Choice Options in the field settings. Then, specify a quantity for each choice option. Alternatively, leaving a quantity blank will ensure that quantity limits are not enforced for that choice option.

Setting quantity limits on choice field.

After you set your quantities, make sure to include the error message that displays when a product is sold out (“Out of stock.”). The error message can be static, or you can use some conditional logic to change the message depending on which choice option is selected:

=if Choice = "Product 1" then "Product 1 is out of stock." else if Choice = "Product 2" then "Product 2 is out of stock." else ""

Once you’ve set your quantity limits, you can also access the quantity limit, the quantity remaining and the quantity used for the selected/entered field value within calculations. Learn more about tracking quantities.

Choice field for products with quantity use, quantity remaining, and quantity limit.

Templates

Quantity limits come in handy in lots of different scenarios. To get started, check out our pre-made templates and take advantage of the ability to:

Have any questions about using quantity limits? Feel free to get in touch with us, or just leave a comment below!


Nadia A.

Nadia A.

Nadia, the Technical Writer for Cognito Forms, develops documentation, support content, and how-to videos. No matter your experience – with her help, you'll be able to take full advantage of the product. In her spare time, Nadia enjoys listening to French house, drinking coffee, and talking about herself in third person.