Class GridValidationBuilder
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
-
GridValidationBuilder is a DataValidationBuilder for a GridValidation in Google Apps Script forms.
-
It can be used to set validation rules for grid items, such as requiring a limit of one response per column.
-
The
requireLimitOneResponsePerColumn()method is available to enforce this rule.
A DataValidationBuilder for a Grid.
// 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);
Methods
| Method | Return type | Brief description |
|---|---|---|
require | Grid | Requires limit of one response per column for a grid item. |
Detailed documentation
requireLimitOneResponsePerColumn()
Requires limit of one response per column for a grid item.
Return
Grid — this validation builder, for chaining