Class CheckboxGridValidation

  • CheckboxGridValidation is a DataValidation specifically for CheckboxGridItems.

  • It allows setting validation rules like requiring one response per column in a checkbox grid item.

  • You can create a CheckboxGridValidation usingFormApp.createCheckboxGridValidation() and apply it to a CheckboxGridItem.

CheckboxGridValidation

A DataValidation for aCheckboxGridItem.

// Add a checkbox grid item to a form and require 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);

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.