Display custom message after submitting a Google Form

I have a Google Form that allows user to enter their information. After they submit the form, the data is inserted to a Google spreadsheet as a new row. However I want to show a dynamic message right after the form is submitted, overriding the original "thank you" message. The new message would display the information they just filled in, with an number assigned to him. For example, Mary filled in her data and submit the form. Since Mary is the 5th person to submit this form, the message shows her number as 5. Is there any way to achieve this? I have been studying Google App Script and HTML service but I am not sure if this is the correct way. Please note that we have already using email to send out this message for several years however user strongly suggest that showing their ID right after form submission would make lots of things much easier. Thank you very much!

Update

I have been working on it and now I am able to make a web page that inserts a new row to a spreadsheet. But another question: How to publish the web page? When I open the "/dev" link it works fine; However when I open the "/exec" link it says cannot find "Index.html" and I am sure there is a file called Index.html.

user3545752 asked Jul 27, 2015 at 3:29 user3545752 user3545752 351 1 1 gold badge 7 7 silver badges 16 16 bronze badges Duplicate of question Possible to have confirmation that displays response data Commented Jul 27, 2015 at 3:57

3 Answers 3

There is no way to add a custom confirmation message for the current user of the currently open Form. You can run code to change the confirmation message when the Form is submitted, but changing the confirmation message when the Form is submitted won't take affect until the NEXT Form is opened, and that's too late. So the next person to open the Form would get the confirmation message of the previous user.

You would need to convert everything to a stand alone HTML App for something like that.

answered Jul 27, 2015 at 3:46 Alan Wells Alan Wells 31.2k 16 16 gold badges 108 108 silver badges 158 158 bronze badges

Thanks for you answer. That's probably what I am looking for, and that's why I mentioned Google App Script and HTML service. But I am still not sure about how to do this.

Commented Jul 27, 2015 at 3:49

You'll need to read the documentation for google.script.run . Click the following link: Google Documentation When you first create and open a new Apps Script file, there is example code for a Web App. Learn the basics, and then expand from there. See this code here also.

Commented Jul 27, 2015 at 3:55

Thanks! I have been working on it and now I am able to make a web page that inserts a new row to a spreadsheet. But another question: How to publish the web page? When I open the "/dev" link it works fine; However when I open the "/exec" link it says cannot find "Index.html" and I am sure there is a file called Index.html.

Commented Jul 27, 2015 at 13:40

The "/exec" link isn't necessarily the latest version of the code. You need to save a new version. PUBLISH, DEPLOY AS WEB APP, NEW, describe what is new.

Commented Jul 27, 2015 at 14:14

Thank you very much! You have really helped me a lot. I figured out that I have missed the "NEW" part.