google 表单脚本插件 onEdit(e) 不工作
google form script addon onEdit(e) not working
我有一个 google 脚本,是我用 google 表格制作的。我输入了以下代码,一切正常 运行。
function onEdit(e){
form = FormApp.getActiveForm();
sheet = SpreadsheetApp.openById(form.getDestinationId())
transferAnnouncments();
}
但是,当我编辑我的表单时,它没有 运行 代码。我没有发布任何内容或添加任何其他基于时间的触发器。
答案:
这不会 运行 因为 Google 表单不支持 onEdit()
触发器。
更多信息:
根据 Event objects, there are only two types of triggers for Google Forms: onOpen()
and Form submit
(the latter is only installable, whereas the former can be either a simple or installable 触发器的文档。
我有一个 google 脚本,是我用 google 表格制作的。我输入了以下代码,一切正常 运行。
function onEdit(e){
form = FormApp.getActiveForm();
sheet = SpreadsheetApp.openById(form.getDestinationId())
transferAnnouncments();
}
但是,当我编辑我的表单时,它没有 运行 代码。我没有发布任何内容或添加任何其他基于时间的触发器。
答案:
这不会 运行 因为 Google 表单不支持 onEdit()
触发器。
更多信息:
根据 Event objects, there are only two types of triggers for Google Forms: onOpen()
and Form submit
(the latter is only installable, whereas the former can be either a simple or installable 触发器的文档。