Opens an existing form by its file ID.
class FormApp method .openById()
FormApp is the Apps Script service.
.openById() is the method name you will see after a dot in your code.
What it does
Why it's used
- Tweak questions on an existing form without opening the editor.
- Read responses from a form you only have the ID for.
Common errors
- Forgetting parentheses on openById. Write FormApp.openById(), not FormApp.openById or openById by itself.
- Skipping dots between chained calls. Each step needs a dot, like FormApp.openById().
- Adding spaces where they do not belong. Write FormApp.openById(), not FormApp .openById(), FormApp.openById (), or FormApp . openById().
- Wrong capitalization. Use FormApp and openById, not formapp or openbyid.
Snippets using this method
Explore
Related methods
-
.getActiveForm()
Returns the form the user currently has open.
-
.create()
Creates a new blank Google Form.
-
.getEditUrl()
Returns the link to edit the form.
-
.setDestination()
Sends new form responses to a spreadsheet.
-
.getPublishedUrl()
Returns the public link respondents use to fill out the form.
More Apps Script
Better Sheets tutorials
Automate Emails
Automatically Copy Spreadsheet Tab to New File with Values Only, No Formulas
Related blog posts
Written guides about FormApp.openById().