Enum ItemType

ItemType

An enum representing the supported types of form items. Item types can be accessed from FormApp.ItemType.

To call an enum, you call its parent class, name, and property. For example, FormApp.ItemType.CHECKBOX.

// Open a form by ID and add a new section header.
const form = FormApp.create('Form Name');
const item = form.addSectionHeaderItem();
item.setTitle('Title of new section');

// Check the item type.
if (item.getType() === FormApp.ItemType.SECTION_HEADER) {
  item.setHelpText('Description of new section.');
}

Properties

PropertyTypeDescription
CHECKBOXEnumA question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field.
CHECKBOX_GRIDEnumA question item, presented as a grid of columns and rows, that allows the respondent to select multiple choices per row from a sequence of checkboxes.
DATEEnumA question item that allows the respondent to indicate a date.
DATETIMEEnumA question item that allows the respondent to indicate a date and time.
DURATIONEnumA question item that allows the respondent to indicate a length of time.
GRIDEnumA question item, presented as a grid of columns and rows, that allows the respondent to select one choice per row from a sequence of radio buttons.
IMAGEEnumA layout item that displays an image.
LISTEnumA question item that allows the respondent to select one choice from a drop-down list.
MULTIPLE_CHOICEEnumA question item that allows the respondent to select one choice from a list of radio buttons or an optional "other" field.
PAGE_BREAKEnumA layout item that marks the start of a page.
PARAGRAPH_TEXTEnumA question item that allows the respondent to enter a block of text.
RATINGEnumA question item that allows the respondent to give a rating.
SCALEEnumA question item that allows the respondent to choose one option from a numbered sequence of radio buttons.
SECTION_HEADEREnumA layout item that visually indicates the start of a section.
TEXTEnumA question item that allows the respondent to enter a single line of text.
TIMEEnumA question item that allows the respondent to indicate a time of day.
VIDEOEnumA layout item that displays a YouTube video.
FILE_UPLOADEnumA question item that lets the respondent upload a file.
UNSUPPORTEDEnumAn item that is currently not supported through APIs.