how to set Confirmation Message based on form Responses in google forms using Apps Script?

柔情痞子 提交于 2020-05-13 06:49:17

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/22738404/how-to-set-confirmation-message-based-on-form-responses-in-google-forms-using-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!