Created
November 9, 2012 12:51
-
-
Save sauntimo/4045531 to your computer and use it in GitHub Desktop.
Creating a usable object from a form submission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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