Checkbox Limits for Gravity Forms

Set Min and Max selections on any checkbox field. Remaining boxes disable in the browser when the max is reached. Server validation checks each page of multi-page forms.

Add minimum and maximum selection limits to Gravity Forms checkbox fields — with live browser disabling and per-page server validation.

Free Gravity Forms add-on · Built on the Gravity Forms Add-On Framework · GPL-2.0-or-later · By Stafford Technologies

The Problem It Solves

Gravity Forms checkbox fields do not include built-in min/max selection counts. Site owners often need rules such as:

  • “Choose up to 5”
  • “Choose 2 to 3”
  • “Choose exactly 1”
  • “Choose at least N”

Without an add-on, visitors can over-select, and multi-page surveys only catch problems (if at all) with custom code.

The guide / solution:
Checkbox Limits for Gravity Forms puts those limits in the form editor, disables extra boxes in the browser when a max is hit, and validates on the server for the page being submitted.

Real-world example — Brand Voice & Tone Survey:
Stafford Technologies uses these limits on its Brand Voice & Tone Survey so respondents stay inside clear rules — for example, choose up to 5 personality traits, pick exactly one brand archetype, and choose 2 to 3 brand beliefs. The same patterns work on any Gravity Forms checkbox field.

Key Features

  1. Min Selections — Require at least N checked boxes on a checkbox field (leave blank for no minimum).
  2. Max Selections — Allow at most N checked boxes; remaining unchecked boxes are disabled in the browser once the max is reached (and re-enabled when a box is unchecked).
  3. Selection Limit Message — Optional per-field custom message; supports {min} and {max} placeholders.
  4. Global Default Message — Under Forms → Settings → Checkbox Limits, set a site-wide default validation message (also supports {min} / {max}). Used when a field has limits but no custom message.
  5. Built-In Fallback Messages — If neither field nor plugin default is set, the add-on uses plain English messages for exact, range, at-least, and at-most cases.
  6. Multi-Page Forms — Server validation runs only for checkbox fields on the page being submitted.
  7. AJAX / Page-Render Safe Front End — Limit config is registered with Gravity Forms init scripts; enforcement re-applies after page renders.
  8. No Form Structure Changes — Limits are stored as custom properties on existing checkbox fields. No fields are added or deleted.
  9. No Paid Gravity Forms Add-Ons Required — Works with Gravity Forms 2.5 or newer; does not depend on Gravity Forms paid extensions.
  10. Uninstall-Safe — Uses the Gravity Forms Add-On Framework uninstall; limits live as field properties on the form.
  11. Docs & Support Links — On the WordPress Plugins screen row for this plugin (both point to this page).
  12. Translation-Ready — Text domain checkbox-limits-for-gravity-forms, domain path /languages (.pot included).

How It Works

In the Form Editor

On every Checkbox field (Standard field settings):

SettingBehavior
Min selectionsNumber input; blank = no minimum.
Max selectionsNumber input; blank = no maximum. When set, the front end disables remaining unchecked boxes at that count.
Selection limit messageOptional text. Placeholders: {min}, {max}. Blank → use plugin default under Forms → Settings → Checkbox Limits, then built-in fallbacks.

Tooltips in the editor explain each setting.

In the Browser (Front End)

  • Once the checked count reaches the max, unchecked boxes are disabled and marked with a disabled style.
  • Unchecking re-enables the others.
  • Min-only fields: the front end does not disable boxes; server validation enforces the minimum.
  • Limits re-apply after multi-page AJAX renders.

On Submit (Server)

  • Validation runs on form submit (and multi-page Next).
  • Counts checked inputs for each limited checkbox field on the current page only.
  • If the count is below the min or above the max, the field fails with the resolved message ({min} / {max} replaced; if max is unset, {max} shows as ∞).

Global Settings

Forms → Settings → Checkbox Limits

  • Field: Default validation message
  • Default value: Please choose {min} to {max} options.
  • Used when a checkbox field has min/max limits but no custom message. Placeholders: {min}, {max}.

Requirements

RequirementValue
WordPress5.8 or higher
Tested up to (WordPress)7.1
PHP7.4 or higher
Gravity Forms2.5 or newer
Paid Gravity Forms add-onsNone required

Installation

  1. Ensure Gravity Forms 2.5+ is installed and active.
  2. Download the latest release zip from GitHub (see Download from GitHub on this page).
  3. In WordPress admin, go to Plugins → Add New → Upload Plugin.
  4. Upload the plugin zip and click Install Now, then Activate.
  5. Edit a form, open a Checkbox field, set Min selections / Max selections (and optional Selection limit message), then Update the form.
  6. (Optional) Set a site-wide default message under Forms → Settings → Checkbox Limits.

Quick Start

  1. Activate Checkbox Limits for Gravity Forms (Gravity Forms must already be active).
  2. Open any form → click a Checkbox field.
  3. Set Min selections and/or Max selections.
  4. Optionally enter a Selection limit message, e.g. Please choose {min} to {max} options.
  5. Update the form.
  6. Preview or view the form: try selecting past the max — extra boxes should disable; try submitting under the min — the field should show the message.
  7. For multi-page forms, test Next on each page that has limited checkboxes.

Example Configurations

GoalMinMax
Choose up to 5blank5
Choose 2–323
Choose exactly 111
Choose 2 to 424
At least 1 only (no max UX)1blank

Real-World Example: Brand Voice & Tone Survey

Stafford Technologies’ Brand Voice & Tone Survey uses Checkbox Limits for Gravity Forms so each section stays within clear bounds, for example:

Survey sectionRuleMinMax
Personality traitsChoose up to 5 personality traitsblank5
Brand archetypePick exactly one brand archetype11
Brand beliefsChoose 2 to 3 brand beliefs23

The same min/max patterns apply to any Gravity Forms checkbox field on any site.

FAQ

Does this change my form structure?
No. Limits are stored as custom properties on existing checkbox fields. No fields are added or deleted.

What if I only set a minimum?
Server-side validation enforces the minimum. The front end only disables boxes when a maximum is set.

What if I only set a maximum?
The browser disables remaining unchecked boxes once the max is reached. Server validation also rejects over-selection if someone bypasses the browser.

Does it work with multi-page forms?
Yes. Validation runs only for checkbox fields on the page being submitted.

Do I need a paid Gravity Forms add-on?
No. Checkbox Limits for Gravity Forms works with Gravity Forms 2.5 or newer and does not require paid Gravity Forms extensions.

Where do I set a default error message for all limited fields?
Go to Forms → Settings → Checkbox Limits and edit Default validation message. Use {min} and {max} placeholders.

What placeholders can I use in messages?
{min} and {max}. If a limit is not set, {min} becomes 0 and {max} becomes ∞ in the replaced string.

Where do I get support?
Email helpdesk@staffordtechnologies.net. Docs and support: https://staffordtechnologies.net/checkbox-limits-for-gravity-forms/. Company site: https://staffordtechnologies.net/. GitHub repository: https://github.com/StaffordTechnologies/checkbox-limits-for-gravity-forms.

Is it free? What is the license?
Yes — Checkbox Limits for Gravity Forms is free ($0.00). It is licensed under GPL-2.0-or-later (GPLv2 or later). See https://www.gnu.org/licenses/gpl-2.0.html.

Where do I download it?
From GitHub Releases (one release per version). Use the Download from GitHub button on this page, or download checkbox-limits-for-gravity-forms-1.0.4.zip directly.

Will uninstalling remove my min/max settings?
The add-on uses the Gravity Forms Add-On Framework uninstall. Limit values are stored as properties on the form’s checkbox fields; removing the plugin stops enforcement but does not rewrite form structure.

Version & Changelog

Current version: 1.0.4
Plugin name: Checkbox Limits for Gravity Forms
Slug: checkbox-limits-for-gravity-forms
Download: GitHub Releases — checkbox-limits-for-gravity-forms-1.0.4.zip (release notes: v1.0.4)
Repository: https://github.com/StaffordTechnologies/checkbox-limits-for-gravity-forms

1.0.4

  • Updated Docs, Support, and plugin URI links to the new plugin page.

1.0.3

  • WordPress.org directory preparation: renamed plugin to “Checkbox Limits for Gravity Forms” (slug checkbox-limits-for-gravity-forms) so the name does not begin with the Gravity Forms trademark.
  • Updated text domain to match the new slug.
  • Updated readme for WordPress.org format; Tested up to WordPress 7.1.
  • Moved plugin icons to SVN assets (not bundled in the plugin zip).
  • Clarified that the plugin is not affiliated with Gravity Forms / Rocketgenius and requires Gravity Forms 2.5+.

1.0.2

  • Security hardening: sanitize min/max/message on form save and at validation output; strip HTML from admin-entered messages; omit validation messages from front-end init scripts; harden POST checkbox counting against non-scalar values; absint page numbers.
  • Removed support phone number from readme.
  • Documented that the plugin is free ($0).

1.0.1

  • Full Stafford Technologies branding (author, URIs, license header).
  • Plugin icons (icon-128×128.png, icon-256×256.png) from the official Stafford brand mark.
  • Docs and Support links on the Plugins screen (plugin_row_meta).
  • Expanded readme with support, FAQ, and branding details.

1.0.0

  • Initial release: field settings, front-end max enforcement, per-page server validation, plugin setting for default message.

Support

Stafford Technologies

On the WordPress Plugins screen, Docs and Support both link to this page.

Support is by email and this page only.

License

Licensed under GPL-2.0-or-later (GPLv2 or later). Free ($0.00).
License details: https://www.gnu.org/licenses/gpl-2.0.html

Checkbox Limits for Gravity Forms is not affiliated with Gravity Forms or Rocketgenius.

Version label: Current version: 1.0.4

Secondary: Email helpdesk@staffordtechnologies.net