I have a google spreadsheet that takes information from two different forms.
Manually triggering using the spreadsheet UI does not let you distinguish which form is specified when choosing "OnFormSubmit" in the triggers menu.
Thus, I am using the following code (for my sheet) to manage two different triggering events for two different form-submits:
function onOpen(e) {
var form = FormApp.openById('ID of Form 1');
ScriptApp.newTrigger('onForm1Submit')
.forForm(form)
.onFormSubmit()
.create();
var signup = FormApp.openById('[ID of Form 2]');
signup.setRequireLogin(true)
ScriptApp.newTrigger('SignUpEvent')
.forForm(signup)
.onFormSubmit()
.create();
}
function SignUpEvent(e) {
\\stuff
}
function onForm1Submit(e) {
\\stuff
}
But when I do it this way, I am recieving a failure notification on form submit:
Function: UpdateLadder
Error Message: "Authorization is required to perform that action."
Trigger: "formSubmit"
First off, how am I recieving these email notifications to begin with? I didn't manually ask for email notifications of error messages. Secondly, what's the best way for me to get "authorization"?