I created a registration form with Google Forms. Now I would like to have an alert displayed before the submitter starts filling out data.

This is my code:

function onOpen() {
      .createMenu('Custom Menu')
      .addItem('Show alert', 'showAlert')
function showAlert() {
  var ui = FormApp.getUi();
  var result = ui.alert(
     'Lorem ipsum',
     'dolor sit amet, consectetur adipiscing elit',

The triggers were set up. The script works fine but only while a form is in in the editing mode, not in a view mode. Actually I'm the only one who can see the message box. It's not what I meant to ;-). How to show this alert to everyone who is going to fill out my form?

1 Answer 1


The Forms Service of Google Apps Scripts doesn't have methods for the respondent view. Actually, there isn't a Google Apps Script service or Google API to be used to extend the respondent view of Google Forms.

One alternative is to embed the Google Form in a web page or application that allow the use of alerts, i.e. Google Sites.


  • Does it mean that there is no way to show any alert or message box in respondent view? Do I have to use only text in the form itself if I want to communicate something to the submitter?
    – gordom
    Commented Nov 19, 2015 at 12:19
  • There are many ways to show an alert. Your question is about using certain code. Anyway, I added to my answer a hint about one alternative. Commented Nov 19, 2015 at 12:45
  • As I know, Google Sites do not have preset alerts Commented Jan 4, 2019 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.