Form Choice Limiter

How to limit responses per option in Google Forms

Google Forms has no setting to cap a choice. Here is what a working script has to do, and the four ways a hand-written one fails without telling you.

Updated 5 November 2026

The short answer

Google Forms can’t do this on its own. You need a small Apps Script attached to the form that, after every submission, counts how many people picked each option and removes (or marks) the ones that have reached their limit. The free generator writes that script for your question in a minute.

  1. Open your form and choose ⋮ → Apps Script.
  2. Paste the script, with your question title and limits filled in.
  3. Run the setup function once and approve Google’s permission prompt.

From then on, every submission triggers a recount, and full options close themselves. The rest of this guide covers what that script must get right.

1. The empty choice list (the one that breaks things)

The obvious implementation counts picks per option, filters out the full ones and writes the rest back with setChoiceValues(). That’s correct right up until the list is empty.

A Google Forms choice question cannot have zero options. When the last seat of the last option goes, setChoiceValues([]) throws, and it throws inside a form-submit trigger where nobody sees it. The form carries on accepting bookings for slots that are already full, and you find out from the people who turn up.

The fix is to relabel instead of emptying:

item.setChoiceValues(
  remaining.length ? remaining : original.map(function (o) { return o + ' — FULL'; })
);

2. Snapshot the original options once, and only once

The script has to remember the full option list before anything is removed, so it can restore it later. If setup runs again after a slot has already closed, a naive version snapshots the trimmed list, and that option is gone for good. People hit this because re-running setup after editing the limits is the natural thing to do.

if (!props.getProperty('FCL_ORIGINAL')) {
  props.setProperty('FCL_ORIGINAL', JSON.stringify(current));
}

3. Use a lock

Two people submitting in the same second both read “one seat left” and both get it. A script lock around the recount is the whole fix. Without it, the bug only shows up on the day the form is busy, which is exactly the day it matters.

var lock = LockService.getScriptLock();
try { lock.waitLock(30000); } catch (e) { return; }
try { /* recount and write back */ } finally { lock.releaseLock(); }

4. Match the question by its exact title

A trailing space or a different apostrophe in the question title is the most common reason a script like this does nothing at all and reports no error. Find the question by its exact title and throw a clear error if it isn’t there, rather than quietly doing nothing. Pasting the title from the form, as the generator asks you to, avoids it.

All four are handled in Form Choice Limiter. The counting and limiting logic is published with tests, including a test for the empty-list case that runs against the exact script you download.

Why not an add-on?

Add-ons work, and for many people they’re the right answer. The catch is that a marketplace add-on needs access to your form and every response in it. For a school, a clinic or an HR team, that’s usually where the conversation stops. A script pasted into your own form’s Apps Script editor runs entirely inside your account: no third party, nothing to get approved.

Set it up in two minutes

Build the free script for one question, or get the full version for $7 once: any number of questions, checkboxes and dropdowns, auto-close and restore.