To call an enum, you call its parent class, name, and property. For example,
FormApp.DestinationType.SPREADSHEET.
// Open a form by ID and create a new spreadsheet.constform=FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');constss=SpreadsheetApp.create('Spreadsheet Name');// Update the form's response destination.form.setDestination(FormApp.DestinationType.SPREADSHEET,ss.getId());
Properties
Property
Type
Description
SPREADSHEET
Enum
A Google Sheets spreadsheet as a destination for form responses.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-02 UTC."],[[["\u003cp\u003e\u003ccode\u003eDestinationType\u003c/code\u003e is an enum defining where form responses can be sent, with all responses saved in the form's response store by default.\u003c/p\u003e\n"],["\u003cp\u003eIt allows specifying a Google Sheet as a destination for form responses using \u003ccode\u003eFormApp.DestinationType.SPREADSHEET\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the destination of a form using the \u003ccode\u003esetDestination()\u003c/code\u003e method, providing the destination type and ID.\u003c/p\u003e\n"]]],[],null,["# Enum DestinationType\n\nDestinationType\n\nAn enum representing the supported types of form-response destinations. All forms, including\nthose that do not have a destination set explicitly, [save a copy of responses in the form's\nresponse store](https://support.google.com/drive/answer/2917686). Destination types can be accessed from [FormApp.DestinationType](/apps-script/reference/forms/form-app#DestinationType).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nFormApp.DestinationType.SPREADSHEET`.\n\n```javascript\n// Open a form by ID and create a new spreadsheet.\nconst form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');\nconst ss = SpreadsheetApp.create('Spreadsheet Name');\n\n// Update the form's response destination.\nform.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());\n``` \n\n### Properties\n\n| Property | Type | Description |\n|---------------|--------|------------------------------------------------------------------|\n| `SPREADSHEET` | `Enum` | A Google Sheets spreadsheet as a destination for form responses. |"]]