Reputation: 13
I'm using a form builder, JotForm, which is integrated with Google Sheets. My Google Sheet has a "Form Responses" sheet, and when submitting a form instance via JotForm, this results in a new row appearing in "Form Responses".
I'm trying to trigger some logic based on this new row appearing. Right now it simply tests that it's getting initiated (which it's not).
Is it possible to use onFormSubmit
for non-Google Forms?
I've created an installable trigger for the Google Sheet (rather than a form) which I believe should work, but it does not. New rows appear, but there are no executions are logged.
function installTrigger() {
ScriptApp.newTrigger('newRow')
.forSpreadsheet(SpreadsheetApp.getActive())
.onFormSubmit()
.create();
}
function onFormSubmit(e){
var responses = e.range;
var sFormType = responses.getValues()[19];
if (sFormType == "Order"){
Logger.log("FormType = " + sFormType);
} else {
Logger.log("FormType = " + sFormType);
}
}
Upvotes: 0
Views: 26