17

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
  • 351
  • 1
  • 7
  • 15
  • 1
    Duplicate of question [Possible to have confirmation that displays response data](http://stackoverflow.com/questions/19759942/is-it-possible-to-have-a-google-form-confirmation-message-that-displays-part-of?rq=1) – Alan Wells Jul 27 '15 at 03:57

3 Answers3

7

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.

Alan Wells
  • 30,746
  • 15
  • 104
  • 152
  • 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... – user3545752 Jul 27 '15 at 03:49
  • 1
    You'll need to read the documentation for `google.script.run`. Click the following link: [Google Documentation](https://developers.google.com/apps-script/guides/html/reference/run) 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](https://script.google.com/d/1QHMW6N47xHTd25WXZVUh3ipRr9FQYgl8HyX5lXYZn2K-19sIkgVKxWzi/edit?usp=drive_web) also. – Alan Wells Jul 27 '15 at 03: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. – user3545752 Jul 27 '15 at 13:40
  • 1
    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. – Alan Wells Jul 27 '15 at 14:14
  • 1
    Thank you very much! You have really helped me a lot. I figured out that I have missed the "NEW" part. – user3545752 Jul 27 '15 at 15:11
7

Google just released a new version of Google Forms. In the settings you can change the confirmation page message for respondents. You can save a link to a web page in the custom message. So if you can create a web page with the data you want displayed, you should be able to save the link in the custom message.

GuitarViking
  • 165
  • 2
  • 12
4

In order to achieve the above-mentioned goal, you need to get the Google form on your web page. No, I am not talking about embedding the form to your web page but to create a stand alone HTML page. The reason behind doing so is since Google is a third party website, editing any code in Google forms is not possible and there is no other way (at least I could not figure out Yet) to place custom thank you page URL for the Google Form. You can even remove certain codes in your HTML page to make sure it doesn't look like or says Google form. Basically, to have custom URL you need to replace

Code to be replaced for custom Thank you url in Google form

In case you are not a techie, Playing with codes might break the code.This step by step blog for customising Google form might help you.

Roy
  • 41
  • 4