Class FormTriggerBuilder

FormTriggerBuilder

A builder for form triggers.

Methods

MethodReturn typeBrief description
create()TriggerCreates and returns the new trigger.
onFormSubmit()FormTriggerBuilderSpecifies a trigger that will fire when a response is submitted to the form.
onOpen()FormTriggerBuilderSpecifies 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.


onFormSubmit()

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

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

Return

FormTriggerBuilder — this FormTriggerBuilder, for chaining


onOpen()

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

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

Return

FormTriggerBuilder — This FormTriggerBuilder, for chaining.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.