Google Form Limit to Number of Dropdown Options

Viewed 9921

Previously, I was using Google Apps Script to populate the choices for a dropdown list question in Google Forms on a weekly basis. One question had as many as 3600 choices at one time. This week, when running the same script with a reduced number of choices (approx. 2000), I receive the following error via script.google.com: "Failed to set choices. You exceeded the maximum number of choices." Is there a new limit to number of choices that can be added? I cannot find one listed anywhere on the web.

Code snippet to reproduce the issue:

var sheetUrl = 'https://docs.google.com/spreadsheets/d/xxxxxxxxxxxxxxxxxxxxx/edit';
var sheet = SpreadsheetApp.openByUrl(sheetUrl).getSheetByName("Form Responses 1");
var data = sheet.getDataRange().getValues();
var formExample = FormApp.openById('xxxxxxxxxxxxxxxxxxxxxxxxxx');
var listOfCustomers= formExample.getItemById(1234567890);
var customerChoices = [];
for (var i = 0; i < data.length; i+=1){
  customerChoices.push(listOfCustomers.asListItem().createChoice(data[i][0]));
}
listOfCustomers.asListItem().setChoices(customerChoices);
2 Answers

While this solution doesn't address the limit imposed on scripts (as of 2022/9/8 it's still 1000) it does provide a manual work-around for someone who doesn't need to automate the process.

Using manual copy-and-paste I have successfully created dropdowns with more than 1000 entries.

Steps:

  1. Copy (ctrl + c) a list of more than 1000 items (from Google Sheets, for example)
  2. Create an empty dropdown in a Google Form
  3. Paste (ctrl + v) the list of items

I created a dropdown with 1690 entries that way.

Credit for this solution goes to TC.

Related