Class CheckboxValidation

CheckboxValidation

A DataValidation for a CheckboxItem.

// Add a checkBox item to a form and require exactly two selections.
var checkBoxItem = form.addCheckboxItem();
checkBoxItem.setTitle('What two condiments would you like on your hot dog?');
checkBoxItem.setChoices([
  checkBoxItem.createChoice('Ketchup'),
  checkBoxItem.createChoice('Mustard'),
  checkBoxItem.createChoice('Relish')
]);
var checkBoxValidation = FormApp.createCheckboxValidation()
  .setHelpText(“Select two condiments.”)
  .requireSelectExactly(2)
  .build();
checkBoxItem.setValidation(checkBoxValidation);

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.