Hey,
I spent some time playing with form based triggers, but had a bad experience.
Here is simplified code
function onGetFormResponse(event) {
console.log('onGetFormResponse:' + event);
}
function test() {
ScriptApp.newTrigger('onGetFormResponse')
.forForm(FormApp.getActiveForm())
.onFormSubmit()
.create();
}
The test() function is driven by UI action and is called once a button is clicked.
I can see the trigger is created, but was disabled with the warning "form trigger this trigger has been disabled for an unknown reason". I then manually save the trigger again, the warning disappears. However, when I submit the form response, the function onGetFormResponse() is not called at all. Wonder to know what was wrong?