Class CheckboxGridValidationBuilder

CheckboxGridValidationBuilder

CheckboxGridValidation 的 DataValidationBuilder。

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

方法

方法傳回類型簡短說明
requireLimitOneResponsePerColumn()CheckboxGridValidationBuilder格線項目的每欄僅限一則回應。

內容詳盡的說明文件

requireLimitOneResponsePerColumn()

格線項目的每欄僅限一則回應。

回攻員

CheckboxGridValidationBuilder:這個驗證建構工具,用於鏈結