如何使用 Apps 脚本根据谷歌表单中的表单响应设置确认消息? [英] how to set Confirmation Message based on form Responses in google forms using Apps Script?

查看:26
本文介绍了如何使用 Apps 脚本根据谷歌表单中的表单响应设置确认消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在谷歌表单中,使用谷歌应用程序脚本,我能否使用通过表单提交的值来设置要向用户显示的确认消息,谁提交了这些值?请注意,现在默认的确认消息是响应已被记录",我知道我可以将此文本更改为其他文本,但我需要的是根据用户的响应来操作消息.

In google forms, using google apps script, will I be able to use the values submitted through the form to set the confirmation message which is to be displayed to the user, who has submitted those values? Note that, the default confirmation message now is "The response has been recorded" and I know that I can change this text to other text, but what I need is to manipulate the message based on responses of the user.

推荐答案

当你 .setConfirmationMessage(message) 在表单提交时,当前消息仍然显示,你的新消息不会出现直到下一次提交表单.操作顺序似乎是 - 1) 将表单值提交到电子表格 2) 显示确认消息 3) 运行表单提交"功能.

When you .setConfirmationMessage(message) on form submit, the current message still gets displayed and your new one won't show up until the next form submission. Seems like the order of operations is - 1) submit values of form to spreadsheet 2) show confirmation message 3) run "on form submit" functions.

因此,我们无法根据当前用户的回答有条件地设置并立即显示自定义消息.确认消息在某种意义上是前置的".

So, we can't conditionally set and immediately display a custom message for the current user's response based on what their answers were. The confirmation message is "front-loaded" in a sense.

这篇关于如何使用 Apps 脚本根据谷歌表单中的表单响应设置确认消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆