// Add a grid item to a form and require one response per column.constform=FormApp.create('My Form');constgridItem=form.addGridItem();gridItem.setTitle('Rate your interests').setRows(['Cars','Computers','Celebrities']).setColumns(['Boring','So-so','Interesting']);constgridValidation=FormApp.createGridValidation().setHelpText('Select one item per column.').requireLimitOneResponsePerColumn().build();gridItem.setValidation(gridValidation);
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-02 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."]]],[]]