Skip to content

Commit

Permalink
Merge pull request Iku#14 from AlexJFox/patch-1
Browse files Browse the repository at this point in the history
Fix script not sending
  • Loading branch information
Iku authored Nov 11, 2018
2 parents 7b63825 + 18d78ab commit b627f1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions google script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
var POST_URL = "WEBHOOKURL";

function onSubmit(e) {
var response = e.response.getItemResponses();
var form = FormApp.getActiveForm();
var allResponses = form.getResponses();
var latestResponse = allResponses[allResponses.length - 1];
var response = latestResponse.getItemResponses();
var items = [];

for (var i = 0; i < response.length ; i++) {
Expand Down Expand Up @@ -34,4 +37,4 @@ function onSubmit(e) {
};

UrlFetchApp.fetch(POST_URL, options);
};
};

0 comments on commit b627f1f

Please sign in to comment.