Saturday, 10 November 2012

Snippets Bakery Project

Now that we know how to set up a Google Form and code a simple notification email based on form submission values that are easier to understand, let's have a look at a more fully-fledged confirmation email with an HTML Table and some date and cost calculations.

This is the Snippets Bakery Order Form and these are the submitted orders. Anyone else hungry? Whilst I was writing this I was pretty disappointed that my orders weren't actually going to result in any cakes being delivered!

The aim of our code is to create something like this confirmation email:

Automatically generated confirmation email with HTML table of responses

In the next few posts I will breakdown various bits of the code and explain how some of the more intricate results were achieved. If you're happy to dive right in, you can get all the code here.


Features and explanatory articles! 

  • Styled HTML Table (formatted with HTML as CSS support in email clients is patchy at best) with responses split in to two sections - part two
  • Work around for the lack of date picker in Google Forms - part three
  • Difference between two dates calculated - part four
  • Total Cost Calculated based on three variables - part five
  • Orders with less than 3 days notice until the fulfilment date are automatically rejected with a polite alternative email.

4 comments:

  1. i'd recommend reading the O'Reilly book.
    https://sites.google.com/site/scriptsexamples/

    ReplyDelete
  2. Thanks for the tip but I'm confident that all the resources you need are available for free online so I wouldn't recommend spending $30 on a book which will go out of date.

    ReplyDelete
  3. I agree, but it helped me get started, about what's possible. I am rather new in GAS and javascript and until now i couldn't find good hands on tutorials and samples especially for the authorization and authentication possibilities and limitations on GAS. So a summary of good online resources would be great.

    ReplyDelete
  4. The best introduction to JavaScript I've come across (and where I started) was http://www.codecademy.com/tracks/javascript.

    Now that I'm writing Google Apps Scripts of my own, I always have the Documentation open - https://developers.google.com/apps-script/defaultservices

    For anything JavaScript related, Mozilla has a great reference at https://developer.mozilla.org/en-US/docs/JavaScript

    ReplyDelete