How to add confirmation emails to google forms

Have you ever used google forms to get some input from your users? It is really easy to set up a google form, add the required input fields and share the form with your users. Here’s an example of a google form.

After the users fill in the form, they will see a short confirmation message on the screen and their responses will be stored. You might also want your users to get a confirmation email after filling out the form. This is not the default behavior of google forms though so you will have to add a small script to do so.

If you fill in and submit the example form you will receive such a confirmation email and see what we are going to set up.

Here’s what you have to do:

  • from the form edit screen choose the tools menu option
  • pick script manager and click the new button
  • you will be redirected to a new page for adding the script
  • pick form in the popup
  • add a name for your script file
  • clear the code if there is any example code in there
  • add the following code:

The code is pretty straightforward: it received the user response as a parameter, it gets an array with the individual answers for each question (itemResponses), it gets the response for each question, sets the subject and the body of the email to be sent and sends the email to the user.

There’s is only one more step to go, we need to set a trigger for this function:

  • go to resources from the menu
  • pick current projects triggers
  • you will notice there are no triggers set up. click on click here to add one now
  • you need to select the method to run (onFormSubmit) and the trigger event from form and on form submit
  • you can also set the notification options – the default is to receive a daily email with the errors that come up, but for testing purposes you could set it to send error messages immediately
  • click save and authorize the app as requested

And that’s it! you now have the needed script. You need to go back to the forms edit page, from the scripts manager popup you need to refresh the scripts list and pick the newly added onFormSubmit script.

And you’re done! You’re ready to test out your form and send it out to your users!

Let me know if you have any questions! šŸ™‚

A collection of UI design articles

Have you ever asked yourself what are the main principles of web design? What are the main things to take into consideration when designing a website or app? I have, and here are the articles I found interesting.

Definitely worth reading! Enjoy!

If you found any other great articles or books on the subject, please let me know!

What to learn?

What should I learn next? That’s a good question… As a software developer you always have new things to learn, a new computer language, a new technology, algorithm, framework…so many. How do you choose between these?

One more problem is…should you learn something new or just improve something you already know? You might find new ideas, new ways of solving the same problems, even better ways. So what to learn?

I, for one, have lots of lists, of new things I encounter and wish to learn more about, of things I want to improve from my current skills, of tutorials, classes, etc. And I’m slowly making my way through them šŸ™‚

In the last months, a couple of sites where launched that offer free university level classes. They areĀ UdacityĀ and CourseraĀ . I took some of the classes there and I must say they are a great way of learning something new or just freshening up your skills. The lectures are filled with quizzes to help you understand the course better and there are also some assignments which I really enjoyed doing šŸ˜€ They also keep adding new classes, so you should take a look and see if there’s anything that interests you šŸ™‚ Also if you know of any other such sites, please let me know!

Step forward in 2017: Build in-demand career skills with Coursera

Organizing Hierarchical Databases

I was researching a better way of organizing the database of one of my projects and came across an interesting article. The article is about organizing hierarchicalĀ data in mysql databases. HereĀ it is. The two methods proposed are very well explained and also the advantages and disadvantages of using each method are presented. It helped me get a clear picture of the available methods and pick the best one for my project šŸ™‚