Как узнать, установлен ли флажок SelectionInput в обратном вызове?У меня есть следующее:
section.addWidget(CardService.newSelectionInput()
.setType(CardService.SelectionInputType.CHECK_BOX)
.setFieldName("chkSaveAttachments")
.addItem("Save Attachments", "chkSaveAttachmentsValue", true));
У меня есть кнопка на моей карте, которая вызывает обратный вызов.Из обратного вызова я могу получить доступ только к значению ("chkSaveAttachmentsValue"), но не могу сказать, установлен флажок или нет.
function saveCallback(e) {
Logger.log(e.formInput.chkSaveAttachments); //prints "chkSaveAttachmentsValue"
Logger.log(e.formInput.chkSaveAttachments.chkSaveAttachmentsValue) //undefined
Logger.log(e.formInput.chkSaveAttachments.chkSaveAttachmentsValue.selected) //undefined
}