It seems that OnEdit only works for spreadsheet?
I have a google form to capture data and sends to user's Calendar. But is there a way to append data if user decides to edit the form submission?
I can't find a trigger for 'edit' of form submission.
Have a look at the google apps script guides.
https://developers.google.com/apps-script/guides/triggers/#available_types_of_triggers
There you see that the onEdit trigger is only available for Sheets. However, it seems you could use a installable trigger that will fire on form submit.
Related
In Google Scripts I'm trying to use a on form submit trigger, but all I see in events are Time-Driven and From Calendar
The project must be bound to the Google form or to the connected spreadsheet for the onFormSubmit trigger to be available in the triggers UI.
Open your Google form
Click Tools > Script editor from within the form
What actually triggers the google appscript onFormSubmit event when form reponses are sent to a google sheet?
Asking because when looking at the google API example for handling form responses, they use a linked sheet and monitor submit event from there
ScriptApp.newTrigger('onFormSubmit').forSpreadsheet(ss).onFormSubmit().create();
The onFormSubmit submit is linked to the sheet, but the object is a sheet, so does entering any data into the sheet itself count or is it only from the Form that is linked to the Sheet? If I wanted to reference the form by ID, would I use the Form ID or the linked Sheet ID? Would the event data still be the same?
Any docs as to what is going on under the surface that could help clarify how this works?
There is an onformsubmit trigger for the form and another one for the spreadsheet.
The onFormSubmit trigger for the form is tied to a function in the Forms script editor and it's triggered on a form submission.
onFormSubmit Trigger for form
The onFormSubmit Trigger for the spreadsheet is tied to a function in the script editor of the spreadsheet where the linked sheet is contained and it also triggers on a form submission. The trigger for the spreadsheet occurs after the linked sheet receives it's data.
onFormSubmit Trigger for Spreadsheet
I am trying to update another google sheet (not the one the form adds info to) when google form is submitted. I tried this with onEdit() but found out that it does not trigger for form edits.
Is there an alternative that triggers on manual edit AND form edit for google sheets?
if you want your function to happen from both form submits and regular edits, add a function
onSubmit(){
onEdit();
}
I am using a code which closes the FORM at specified time. So what happened is some students are failing to submit it before the time limit and their responses are not being recorded.
Is there any way to force auto-submit a google form at specified end-time for all the users who are writing the quiz lets say!
Any ideas are welcome.
You can check this documentation about Installable Triggers which let Apps Script run a function automatically when a certain event occurs. It is similar to simple triggers for Google Apps like onOpen(), but they can respond to additional events, and they behave differently.
There are several installable triggers for Google Apps and you can use an installable form-submit trigger that runs when a user responds to a form.
Be noted that there are two versions of the form-submit trigger, one for Google Forms itself and one for Sheets if the form submits to a spreadsheet.
I have a google application script that changes a value in A1 in onLoad event in a spreadsheet. This triggers a cascade of changes. I would like to detect the event when let's say cell F200 is changed because of the edit to cell A1. How do I set up the triggers to detect this change?
An installable open trigger runs when a user opens a spreadsheet, document, or form that he or she has permission to edit.
An installable edit trigger runs when a user modifies a value in a spreadsheet.
An installable change trigger runs when a user modifies the structure of a spreadsheet itself — for example, by adding a new sheet or removing a column.
An installable form-submit trigger runs when a user responds to a form. There are two versions of the form-submit trigger, one for Google Forms itself and one for Sheets if the form submits to a spreadsheet.