不允许在特定时间提交 Google 表单

Don't allow Google Form submission at specific time

我有一个 Google 表单,但我想限制此表单的使用。 从 19:00 到 21:00。

用户应该无法提交此表单

查看 events 文档,没有可在用户打开表单时触发的事件(编辑时除外)。

我能想到的唯一其他方法是在添加条目后将其删除,但重要的是要防止创建新条目。因此,on form submit 函数似乎也不是正确的选择。

理想情况下,当用户在禁止的时间范围内打开表单时,我们会向用户发出通知,要求 him/her 到 return 之后。关于如何实现这一点有什么建议吗?

您可以查看表格 class,尤其是 setAcceptingResponses(enabled) method, which is allowing you to accepting new responses. You can use it with a time based trigger 以禁用 19:00 的新回复并在 21:00 启用它。

否则,您可以使用 FormTriggerBuilder class 并创建一个 onFormSubmit() 触发器来通知用户时间限制,因为其他触发器无法更快地通知您的用户。