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

StackOverflow https://stackoverflow.com/questions/22738404

  •  23-06-2023
  •  | 
  •  

سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top