// Add a checkbox grid item to a form and restrict it to one response per// column.constform=FormApp.openById('123abc');constcheckboxGridItem=form.addCheckboxGridItem();checkboxGridItem.setTitle('Where did you celebrate New Years?').setRows(['New York','San Francisco','London']).setColumns(['2014','2015','2016','2017']);constcheckboxGridValidation=FormApp.createcheckboxGridValidation().setHelpText('Select one item per column.').requireLimitOneResponsePerColumn().build();checkboxGridItem.setValidation(checkboxGridValidation);
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eCheckboxGridValidationBuilder\u003c/code\u003e helps create validations for checkbox grid items in Google Forms.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting restrictions like limiting responses to one per column.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erequireLimitOneResponsePerColumn()\u003c/code\u003e method enforces this single response restriction.\u003c/p\u003e\n"],["\u003cp\u003eThis builder is used with \u003ccode\u003esetValidation()\u003c/code\u003e on a checkbox grid item to apply validation rules.\u003c/p\u003e\n"]]],[],null,[]]