Skip to content

Instantly share code, notes, and snippets.

@sauntimo
Created November 9, 2012 12:51
Show Gist options
  • Save sauntimo/4045531 to your computer and use it in GitHub Desktop.
Save sauntimo/4045531 to your computer and use it in GitHub Desktop.
Creating a usable object from a form submission
function formSubmitReply(e) {
/* ----- CREATE NEW OBJECT FROM SUBMISSION ----- */
var NewSubmission = {
"Timestamp" : e.values[0],
"Favourite Colour" : e.values[1],
"Explanation" : e.values[2],
}
MailApp.sendEmail("[email protected]", "Your form was submitted!",
"Hey you!" +
"\n\n Someone submitted your form. Here's what they had to say:" +
"\n\n Favourite Colour: " + NewSubmission["Favourite Colour"] +
"\n Explanation: " + NewSubmission["Explanation"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment