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
| <table style="border:2px solid black;width:500"> | |
| <tbody> | |
| <tr><th colspan="2" bgcolor="#c7ced4">Section One: Product Details</th></tr> | |
| <tr bgcolor="#d0eaf9"><td>Size</td><td>10" - £25</td></tr> | |
| <tr><td>Style</td><td>Victoria Sponge Cake</td></tr> | |
| <tr bgcolor="#d0eaf9"><td>Filling</td><td>Strawberry Jam</td></tr> | |
| <tr><td>Topping</td><td>Buttercream</td></tr> | |
| <tr bgcolor="#d0eaf9"><td>Decoration</td><td>Marshmallows, Strawberries, "Happy Birthday!"</td></tr> | |
| <tr><th colspan="2" bgcolor="#c7ced4">Section Two: Delivery Details</th></tr> | |
| <tr bgcolor="#d0eaf9"><td>First name</td><td>Joe</td></tr> |
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 OnSubmit(e){ | |
| var NewSubmission = {}; | |
| var Properties = ["Timestamp","Favourite Colour","Explanation"]; | |
| var i = 0; | |
| for(i = 0; i < Properties.length; i++){ | |
| NewSubmission[Properties[i]] = e.values[i]; | |
| } |
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 OnSubmit(e){ | |
| MailApp.sendEmail("gassnippets@gmail.com", "Your form was submitted!", | |
| "Hey you!" + | |
| "\n\n Someone submitted your form. Here's what they had to say:" + | |
| "\n\n Favourite Colour: " + e.values[1] + | |
| "\n Explanation: " + e.values[2]) | |
| } |
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
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
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], | |
| } |
NewerOlder