GridValidation
的 DataValidationBuilder。
// 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);
方法
方法 | 傳回類型 | 簡短說明 |
---|---|---|
requireLimitOneResponsePerColumn() | GridValidationBuilder | 格線項目的每欄僅限一則回應。 |