Class CheckboxGridValidationBuilder

复选框网格验证构建器

CheckboxGridValidation 的 DataValidationBuilder。

// Add a checkbox grid item to a form and restrict it to one response per
// column.
const form = FormApp.openById('123abc');
const checkboxGridItem = form.addCheckboxGridItem();
checkboxGridItem.setTitle('Where did you celebrate New Years?')
    .setRows(['New York', 'San Francisco', 'London'])
    .setColumns(['2014', '2015', '2016', '2017']);
const checkboxGridValidation = FormApp.createcheckboxGridValidation()
                                   .setHelpText('Select one item per column.')
                                   .requireLimitOneResponsePerColumn()
                                   .build();
checkboxGridItem.setValidation(checkboxGridValidation);

方法

方法返回类型简介
requireLimitOneResponsePerColumn()CheckboxGridValidationBuilder要求网格项每列限一条回答。

详细文档

requireLimitOneResponsePerColumn()

要求网格项每列限一条回答。

返回

CheckboxGridValidationBuilder - 此验证构建器,用于链接