Class FormTriggerBuilder

Form Trigger Builder

A builder for form triggers.

Methods

Method Return type Brief description
Trigger Creates and returns the new trigger.
Form Trigger Builder Specifies a trigger that will fire when a response is submitted to the form.
Form Trigger Builder Specifies a trigger that will fire when the form's edit view is opened.

Detailed documentation

create()

Creates and returns the new trigger.

Return

Trigger — The new trigger.


on Form Submit()

Specifies a trigger that will fire when a response is submitted to the form.

 const 
  
 form 
  
 = 
  
 FormApp 
 . 
 openById 
 ( 
 '1234567890abcdefghijklmnopqrstuvwxyz' 
 ); 
 ScriptApp 
 . 
 newTrigger 
 ( 
 'myFunction' 
 ). 
 forForm 
 ( 
 form 
 ). 
 onFormSubmit 
 (). 
 create 
 (); 

Return

Form Trigger Builder — this Form Trigger Builder , for chaining


on Open()

Specifies a trigger that will fire when the form's edit view is opened.

 const 
  
 form 
  
 = 
  
 FormApp 
 . 
 getActiveForm 
 (); 
 ScriptApp 
 . 
 newTrigger 
 ( 
 'myFunction' 
 ). 
 forForm 
 ( 
 form 
 ). 
 onOpen 
 (). 
 create 
 (); 

Return

Form Trigger Builder — This Form Trigger Builder , for chaining.

Create a Mobile Website
View Site in Mobile | Classic
Share by: