Tutorials

Building Quantity Fields: Number of Guests, Items, etc.

Building Quantity Fields
Event registrations ask how many guests are coming. Order forms need item quantities. Booking forms ask for party size. A plain text field lets respondents type “five” or “99999” — bad data that breaks your planning and reporting.

Auto Form Builder includes a flexible Number field designed for quantity inputs — with minimum and maximum limits, step controls, optional sliders, and validation on both the frontend and server. Build guest counts, item quantities, ticket numbers, and any whole-number field your forms need.

Last updated: Last update 18 August

Why Use a Number Field for Quantities?

A quantity field must accept only valid numbers within a sensible range. Auto Form Builder’s Number field enforces this automatically:

  • Numeric input only — rejects text like “ten” or “a few”
  • Minimum and maximum limits — prevent impossible values (0 guests at a paid event, 500 tickets when capacity is 50)
  • Step size control — restrict to whole numbers for items and guests
  • Mobile-friendly keyboard — shows a decimal/numeric keypad on phones and tablets
  • Server-side validation — blocks manipulated form data from bypassing your rules

Submitted quantities are stored as numbers in your submissions inbox — ready for search, export, email notifications, and reporting.

Quick Start: Event Registration Template

Auto Form Builder includes an Event Registration template with a pre-built quantity field you can customize:

  1. Go to Auto Form Builder → Forms and create a new form.
  2. Choose the Event Registration template (event or workshop signup).
  3. The template includes a Number of Guests field pre-configured with:
    • Minimum: 0
    • Maximum: 10
    • Placeholder: “Enter number of guests”
  4. Adjust the min, max, label, and required setting to match your event.
  5. Save and embed the form on your site.

The template also includes Full Name, Email, Phone, and Special Requirements fields — a complete event signup form ready to publish.

Step-by-Step: Add a Quantity Field from Scratch

  1. Open your form in the form builder.
  2. From the field sidebar under Basic, drag a Number field onto your form.
  3. Click the field to open its settings panel.
  4. Set the Field Label — for example, “Number of Guests,” “Quantity,” or “How many tickets?”
  5. Configure the number options below.

Recommended Settings for Quantity Fields

Setting Guests Example Items Example
Lowest Allowed Value 0 (additional guests) or 1 (minimum party size) 1 (must order at least one)
Highest Allowed Value 10 (venue limit per registration) 100 (stock limit)
Step Size 1 (whole guests only) 1 (whole items only)
How to Display Plain Number Plain Number
Starting Value 1 (optional pre-fill) 1 (optional pre-fill)
Required Enable if quantity must be entered Enable for order forms

Save your form when finished.

Quantity Field Settings Explained

Lowest Allowed Value (Minimum)

0 since the primary registrant is captured separately. For “Party Size” where at least one person must attend, set minimum to 1.

Highest Allowed Value (Maximum)

Sets the upper limit. Match this to your real-world capacity — table seats, ticket inventory, workshop spots, or per-order limits. If someone enters a value above the maximum, they see a clear error: “Value must be no more than 10.”

Step Size

Controls how much the value changes when using keyboard arrows or a slider. For quantity fields, use 1 so only whole numbers are accepted — no 2.5 guests or 3.7 items. Step validation also runs on the server with the message “Please enter a value in increments of 1.”

Starting Value

Pre-fills the field when the form loads. Setting a starting value of 1 saves respondents a click on order forms where most people order one item. Leave empty if you want the field blank by default.

How to Display

For quantity fields, choose Plain Number. Currency and percentage formats are available for price and survey fields but are not needed for guest counts or item quantities.

Placeholder and Help Text

Add placeholder text like “Enter number of guests” to guide respondents. Use help text below the field for extra context — for example, “Including yourself. Maximum 10 guests per registration.”

Optional: Quantity Slider for Small Ranges

When your quantity range is small and fixed — for example, 1 to 10 guests — a slider can be faster than typing. Enable Show as Slider in the Number field settings:

  1. Check Show as Slider.
  2. Set your min and max values (e.g., 1 and 10).
  3. Set step to 1.
  4. Optionally enable Show Number Next to Slider so the current value displays as users drag.
  5. Choose a Slider Color to match your form style.

Sliders work well for guest counts, star ratings on a numeric scale, and any quantity between roughly 1 and 20. For larger ranges (1–500 items), a standard number input is more practical.

Validation Keeps Quantity Data Clean

Auto Form Builder validates quantity fields on both the frontend (before submission) and the server (when the form is processed):

  • Below minimum — “Value must be at least 1.”
  • Above maximum — “Value must be no more than 10.”
  • Non-numeric input — “Please enter a valid number.”
  • Wrong step increment — “Please enter a value in increments of 1.”
  • Empty required field — standard required field validation blocks submission

The value 0 is treated as a valid number when your minimum allows it — useful for “additional guests” fields where zero is a legitimate answer.

Practical Quantity Field Examples

Event RSVP — Number of Guests

  • Label: “Number of Additional Guests”
  • Min: 0, Max: 10, Step: 1
  • Help text: “How many guests will you bring? (Not including yourself)”

Product Order — Item Quantity

  • Label: “Quantity”
  • Min: 1, Max: 50, Step: 1
  • Starting value: 1
  • Required: Yes

Restaurant Booking — Party Size

  • Label: “Number of People”
  • Min: 1, Max: 20, Step: 1
  • Enable slider for quick selection

Workshop Registration — Number of Tickets

  • Label: “Number of Tickets”
  • Min: 1, Max: 5, Step: 1
  • Placeholder: “How many spots do you need?”

Volunteer Signup — Hours Available

  • Label: “Hours Available Per Week”
  • Min: 1, Max: 40, Step: 1

Combine Quantity Fields with Conditional Logic

Not every respondent needs a quantity field. Use conditional logic to show it only when relevant:

  • Show “Number of Guests” only when Will you attend? equals Yes
  • Show “Quantity” only when a product checkbox is selected
  • Show “Number of Children” only when Bringing children? equals Yes

Enable Conditional Logic on the Number field, add your conditions, and choose AND or OR logic. Hidden quantity fields are disabled automatically and do not block form submission — even if marked as required.

Multiple Quantity Fields on One Form

Forms often need more than one quantity input. Add a separate Number field for each item or category:

  • Adult Tickets — min 0, max 10
  • Child Tickets — min 0, max 10
  • Senior Tickets — min 0, max 10

Each field validates independently. All values appear in your submissions inbox, email notifications (via {submission_data} or field placeholders), and CSV exports as separate columns.

Viewing and Exporting Quantity Submissions

When respondents submit the form, quantity values are saved as numbers in Auto Form Builder → Submissions. You can:

  • Search submissions by quantity value or any other field
  • Filter by form, date range, or status (Unread, Starred, Read)
  • Export to CSV for spreadsheet analysis — numeric values export cleanly for totaling and reporting
  • Receive email notifications with quantity values included in the submission details

Tips for Better Quantity Fields

  • Set realistic max values based on actual capacity or inventory — do not leave max unlimited unless truly needed.
  • Use step 1 for guest and item counts — fractional quantities are rarely useful.
  • Pre-fill with 1 on order forms to reduce friction for the most common case.
  • Add help text clarifying what the number represents — “Additional guests only” vs. “Total party size including yourself.”
  • Mark as required when the quantity is essential for processing the submission.
  • Use half-width layout for compact quantity fields alongside product name or date fields.
  • Test edge cases — submit with min value, max value, empty field, and values outside the range to confirm validation works.

Get Started with Free Quantity Fields

Number fields with min/max validation, step controls, sliders, conditional logic, and the Event Registration template are all included in the free Auto Form Builder plugin.

Install from WordPress.org:

https://wordpress.org/plugins/auto-form-builder/

Last updated: Last update 18 August

Build forms that embed anywhere — free

Auto Form Builder lets you create multi-step forms, calculators, and lead capture forms in WordPress, then embed them on any site with a single line of code.

Install the free plugin

Frequently Asked Questions

What field type should I use for quantity inputs?

Use the Number field from the Basic category in Auto Form Builder. Configure min, max, and step settings to enforce valid quantity ranges for guests, items, tickets, and more.

Does Auto Form Builder have a number of guests field?

The Event Registration template includes a pre-built Number of Guests field with min 0 and max 10. You can customize the label, limits, and required setting, or add your own Number field to any form.

Can I restrict quantities to whole numbers only?

Yes. Set Step Size to 1. Both client-side and server-side validation enforce whole-number increments only.

Can I set a minimum and maximum quantity?

Yes. Use Lowest Allowed Value and Highest Allowed Value in the Number field settings. Respondents cannot submit values outside your defined range.

Can I use a slider for quantity selection?

Yes. Enable Show as Slider on a Number field with min, max, and step set. Optionally show the current value next to the slider as users drag.

Is zero a valid quantity?

Yes, when your minimum is set to 0. This is useful for additional guests fields where the respondent may not bring anyone extra.

Can I show a quantity field only for certain answers?

Yes. Enable Conditional Logic on the Number field to show or hide it based on other field values — for example, only when “Will you attend?” equals “Yes.”

Are quantity fields included in the free plugin?

Yes. Number fields with full validation, the Event Registration template, conditional logic, and submission management are included in the free Auto Form Builder plugin.


Leave a Reply

Your email address will not be published. Required fields are marked *