I am trying to create a custom alert message in a Google Form, the idea is that once the user submits the form it should show a message displaying a result based on what the user inputs on the form.
I've tried to use Browser.msgBox()
and getUi().alert()
but they seem to only work in spreadsheets.
Is there any way to achieve this inside a form?
Asked
Active
Viewed 1,609 times
1

Rafa Guillermo
- 14,474
- 3
- 18
- 54

iBadell
- 81
- 1
- 5
-
What kind of form Google Form or html form? – Cooper Jan 02 '20 at 19:57
-
1You can't do this with [Google Forms](https://www.google.com/forms/about/). – IMTheNachoMan Jan 02 '20 at 22:02
-
Thats what I thought. Im gonna have to find a other way then. Thank you – iBadell Jan 02 '20 at 23:15
-
@Frippie did you find another way? – Norah Jones Aug 10 '21 at 20:43
1 Answers
1
Answer:
This can not be done in Google Forms.
More Information:
According to Google's documentation on Simple and Installable triggers:
The open event for Google Forms does not occur when a user opens a form to respond, but rather when an editor opens the form to modify it.
If attempting to run the FormApp.getUi()
method on an installable trigger on Form Submit, the following error appears in the Stackdriver logs under My Executions
:
Error: Cannot call
FormApp.getUi()
from this context. at onSumbit(Code:2)
So unfortunately, this can not be completed.
References:

Community
- 1
- 1

Rafa Guillermo
- 14,474
- 3
- 18
- 54