Form Choice Limiter

Cap how many people can pick each option in a Google Form. When an option fills up, it closes itself.

Get it — $9One file. One payment. No subscription, no account.

The problem

Google Forms has no way to say “only four people may take Monday 9am”. You find out the slot was oversubscribed after everyone has already booked it.

The usual fix is a marketplace add-on — which means granting a third party access to your form and every response in it. For a school, a clinic or an HR team, that is often exactly why the answer is no.

How it works

1

Open your form's script editor

Your Form → ⋮ → Apps Script.

2

Paste one file in

Replace everything in Code.gs with FormChoiceLimiter.gs.

3

Set your limits and run setup

Edit the CONFIG block, run setup once, approve the prompt.

It runs entirely inside your own Google account. Nothing is installed, nothing is reviewed, and no third party — including me — can see your form or your responses.

Set the limits in plain English

limits: {
  'Pick a time slot': {
    'Monday 9:00': 4,      // four seats
    'Monday 10:00': 4,
    'Tuesday 14:00': 2
  },
  'Equipment': { 'Camera': 1, 'Tripod': 2 }
}

Anything you don’t list stays unlimited. A limit of 0 makes an option unavailable from the start.

The detail most versions get wrong

A Google Forms choice question cannot have zero options. When the last seat of the last option goes, the obvious implementation tries to write an empty list, the update fails — usually silently — and the form carries on taking bookings for slots that are already full.

This one detects that case and relabels every option instead of emptying the question, and can close the form with a message if you want it to. That behaviour is covered by a test that runs against the exact file you receive.

Looking for a Choice Eliminator alternative?

If you landed here searching for Choice Eliminator, Choice Eliminator Lite or Choice Eliminator 2, this does the same job with two differences.

  • It is not an add-on. Nothing is installed and no third party can read your form or its responses — the code runs in your own Apps Script project.
  • It cannot stop working because someone else's service went down or changed its pricing. It is a file you own.
  • The free version below handles one question. The $9 version handles as many as you like.

Free version — one question, copy it and go

This handles a single multiple-choice question and it genuinely works. If that is all you need, take it — no email, no signup, nothing to buy. The paid version adds multiple questions, dropdown and checkbox support, strike-through mode, auto-close, restore, and an install guide.

/**
 * Form Choice Limiter — free single-question version.
 * Caps how many people can pick each option in ONE multiple-choice question.
 *
 * Setup: Form → ⋮ → Apps Script → paste this in → edit QUESTION and LIMITS →
 * run `setupLimiter` once and approve the prompt.
 */
var QUESTION = 'Pick a time slot';          // exact question title
var LIMITS = {                              // option: how many people may pick it
  'Monday 9:00': 4,
  'Tuesday 14:00': 2
};

function setupLimiter() {
  var form = FormApp.getActiveForm();
  PropertiesService.getDocumentProperties()
    .setProperty('FCL_FREE_ORIGINAL', JSON.stringify(getItem_(form).getChoices().map(function (c) {
      return String(c.getValue()).replace(/ — FULL$/, '');
    })));
  ScriptApp.getProjectTriggers().forEach(function (t) {
    if (t.getHandlerFunction() === 'applyLimit') ScriptApp.deleteTrigger(t);
  });
  ScriptApp.newTrigger('applyLimit').forForm(form).onFormSubmit().create();
  applyLimit();
}

function applyLimit() {
  var lock = LockService.getScriptLock();
  try { lock.waitLock(30000); } catch (e) { return; }
  try {
    var form = FormApp.getActiveForm();
    var original = JSON.parse(PropertiesService.getDocumentProperties().getProperty('FCL_FREE_ORIGINAL'));

    var counts = {};
    form.getResponses().forEach(function (fr) {
      fr.getItemResponses().forEach(function (ir) {
        if (ir.getItem().getTitle() !== QUESTION) return;
        var v = ir.getResponse();
        (Array.isArray(v) ? v : [v]).forEach(function (c) {
          if (c) counts[c] = (counts[c] || 0) + 1;
        });
      });
    });

    var remaining = original.filter(function (opt) {
      var lim = LIMITS[opt];
      return typeof lim !== 'number' || (counts[opt] || 0) < lim;
    });

    // A Forms question cannot have zero choices — label instead of emptying.
    getItem_(form).setChoiceValues(
      remaining.length ? remaining : original.map(function (o) { return o + ' — FULL'; })
    );
  } finally { lock.releaseLock(); }
}

function getItem_(form) {
  var found = form.getItems(FormApp.ItemType.MULTIPLE_CHOICE)
    .filter(function (i) { return i.getTitle() === QUESTION; })[0];
  if (!found) throw new Error('No multiple-choice question titled "' + QUESTION + '"');
  return found.asMultipleChoiceItem();
}

Form → ⋮ → Apps Script → paste → edit QUESTION and LIMITS → run setupLimiter once.

What you get

  • FormChoiceLimiter.gs — the complete, commented script
  • Multiple choice, dropdown and checkbox questions
  • Any number of questions, each with its own per-option limits
  • Hide a full option, or keep it visible marked “— FULL”
  • Optionally close the form once everything is taken
  • restoreAllChoices() to put every option back
  • A 2-minute install guide, plus troubleshooting

Form Choice Limiter — $9

One-time. Works on personal Gmail and Google Workspace accounts.

Get it — $9

Something not working on your form? Email me with the question title and what you expected, and I’ll fix it.