Class GridValidation

GridValidation

A DataValidation for a GridItem.

 // Add a grid item to a form and require one response per column.
 var gridItem = form.addGridItem();
 gridItem.setTitle('Rate your interests')
   .setRows(['Cars', 'Computers', 'Celebrities'])
   .setColumns(['Boring', 'So-so', 'Interesting']);
 var gridValidation = FormApp.createGridValidation()
   .setHelpText(“Select one item per column.”)
   .requireLimitOneResponsePerColumn()
   .build();
 gridItem.setValidation(gridValidation);
 

Methods

MethodReturn typeBrief description
getHelpText()StringGets the DataValidation's help text.

Detailed documentation

getHelpText()

Gets the DataValidation's help text. This text is shown to the user if the input fails validation.

Return

String — the DataValidation's help text

Send feedback about...

Apps Script
Apps Script