[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eFormTriggerBuilder helps in creating custom triggers for Google Forms.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to set triggers for form submission (\u003ccode\u003eonFormSubmit()\u003c/code\u003e) and form opening (\u003ccode\u003eonOpen()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecreate()\u003c/code\u003e method finalizes and returns the new trigger.\u003c/p\u003e\n"],["\u003cp\u003eTriggers execute specified functions (\u003ccode\u003emyFunction\u003c/code\u003e in the examples) when the defined event (submit or open) occurs.\u003c/p\u003e\n"]]],[],null,["FormTriggerBuilder\n\nA builder for form triggers. \n\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------------|--------------------------------------------------|------------------------------------------------------------------------------|\n| [create()](#create()) | [Trigger](/apps-script/reference/script/trigger) | Creates and returns the new trigger. |\n| [onFormSubmit()](#onFormSubmit()) | [FormTriggerBuilder](#) | Specifies a trigger that will fire when a response is submitted to the form. |\n| [onOpen()](#onOpen()) | [FormTriggerBuilder](#) | Specifies a trigger that will fire when the form's edit view is opened. |\n\nDetailed documentation \n\n`create()` \nCreates and returns the new trigger.\n\nReturn\n\n\n[Trigger](/apps-script/reference/script/trigger) --- The new trigger.\n\n*** ** * ** ***\n\n`on``Form``Submit()` \nSpecifies a trigger that will fire when a response is submitted to the form.\n\n```javascript\nconst form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');\nScriptApp.newTrigger('myFunction').forForm(form).onFormSubmit().create();\n```\n\nReturn\n\n\n[FormTriggerBuilder](#) --- this [FormTriggerBuilder](#), for chaining\n\n*** ** * ** ***\n\n`on``Open()` \nSpecifies a trigger that will fire when the form's edit view is opened.\n\n```javascript\nconst form = FormApp.getActiveForm();\nScriptApp.newTrigger('myFunction').forForm(form).onOpen().create();\n```\n\nReturn\n\n\n[FormTriggerBuilder](#) --- This [FormTriggerBuilder](#), for chaining."]]