Adds a short-answer text question to the form.
class FormApp method .addTextItem()
FormApp is the Apps Script service.
.addTextItem() is the method name you will see after a dot in your code.
What it does
Why it's used
- Add a company name or notes question programmatically.
- Build forms from a list of fields in a sheet.
Common errors
- Forgetting parentheses on addTextItem. Write FormApp.addTextItem(), not FormApp.addTextItem or addTextItem by itself.
- Skipping dots between chained calls. Each step needs a dot, like FormApp.addTextItem().
- Adding spaces where they do not belong. Write FormApp.addTextItem(), not FormApp .addTextItem(), FormApp.addTextItem (), or FormApp . addTextItem().
- Wrong capitalization. Use FormApp and addTextItem, not formapp or addtextitem.
1 Snippets using this method
Explore
Related methods
-
.addMultipleChoiceItem()
Adds a multiple-choice question to the form.
-
.create()
Creates a new blank Google Form.
-
.getResponses()
Returns all submitted responses to 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
2 Better Sheets tutorials
Automate Emails
Related blog posts
Written guides about FormApp.addTextItem().