// Add a grid item to a form and require one response per column.
const form = FormApp.create('My Form');
const gridItem = form.addGridItem();
gridItem.setTitle('Rate your interests')
.setRows(['Cars', 'Computers', 'Celebrities'])
.setColumns(['Boring', 'So-so', 'Interesting']);
const gridValidation = FormApp.createGridValidation()
.setHelpText('Select one item per column.')
.requireLimitOneResponsePerColumn()
.build();
gridItem.setValidation(gridValidation);
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2024-12-03 (שעון UTC)."],[[["`GridValidationBuilder` facilitates the creation of validation rules for grid items within Google Forms."],["It offers the functionality to enforce a single response per column in grid questions, enhancing data integrity."],["The `requireLimitOneResponsePerColumn()` method is central to establishing this constraint, streamlining response collection."],["Developers can leverage the `GridValidationBuilder` to tailor validation logic, ensuring responses meet specified criteria."]]],[]]