Enum DestinationType
DestinationType
An enum representing the supported types of form-response destinations. All forms, including
those that do not have a destination set explicitly, save a copy of responses in the form's
response store. Destination types can be accessed from FormApp.DestinationType
.
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.
const form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
const ss = 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. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.
[null,null,["Last updated 2024-12-02 UTC."],[[["`DestinationType` is an enum defining where form responses can be sent, with all responses saved in the form's response store by default."],["It allows specifying a Google Sheet as a destination for form responses using `FormApp.DestinationType.SPREADSHEET`."],["You can set the destination of a form using the `setDestination()` method, providing the destination type and ID."]]],[]]