# Forms Service

Forms

This service allows scripts to create, access, and modify Google Forms.

```
// Create a new unpublished form, then add a checkbox question, a multiple choice question,
// a page break, then a date question and a grid of questions, then publish the form and share
// with responders.
var form = FormApp.create('New Form', /* isPublished= */ false);
var item = form.addCheckboxItem();
item.setTitle('What condiments would you like on your hot dog?');
item.setChoices([
        item.createChoice('Ketchup'),
        item.createChoice('Mustard'),
        item.createChoice('Relish')
    ]);
form.addMultipleChoiceItem()
    .setTitle('Do you prefer cats or dogs?')
    .setChoiceValues(['Cats','Dogs'])
    .showOtherOption(true);
form.addPageBreakItem()
    .setTitle('Getting to know you');
form.addDateItem()
    .setTitle('When were you born?');
form.addGridItem()
    .setTitle('Rate your interests')
    .setRows(['Cars', 'Computers', 'Celebrities'])
    .setColumns(['Boring', 'So-so', 'Interesting']);

form.setPublished(true);
form.addPublishedReaders(['user@example.com', 'group@example.com']);

Logger.log('Published URL: ' + form.getPublishedUrl());
Logger.log('Editor URL: ' + form.getEditUrl());
```

## Classes

| Name | Brief description |
|---|---|
| `Alignment` | An enum representing the supported types of image alignment. |
| `CheckboxGridItem` | A 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. |
| `CheckboxGridValidation` | A DataValidation for a `CheckboxGridItem`. |
| `CheckboxGridValidationBuilder` | A DataValidationBuilder for a `CheckboxGridValidation`. |
| `CheckboxItem` | A question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field. |
| `CheckboxValidation` | A DataValidation for a `CheckboxItem`. |
| `CheckboxValidationBuilder` | A DataValidationBuilder for a `CheckboxValidation`. |
| `Choice` | A single choice associated with a type of `Item` that supports choices, like `CheckboxItem`, `ListItem`, or `MultipleChoiceItem`. |
| `DateItem` | A question item that allows the respondent to indicate a date. |
| `DateTimeItem` | A question item that allows the respondent to indicate a date and time. |
| `DestinationType` | An enum representing the supported types of form-response destinations. |
| `DurationItem` | A question item that allows the respondent to indicate a length of time. |
| `FeedbackType` | An enum representing the supported types of feedback. |
| `Form` | A form that contains overall properties and items. |
| `FormApp` | Allows a script to open an existing `Form` or create a new one. |
| `FormResponse` | A response to the form as a whole. |
| `GridItem` | A 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. |
| `GridValidation` | A DataValidation for a `GridItem`. |
| `GridValidationBuilder` | A DataValidationBuilder for a `GridValidation`. |
| `ImageItem` | A layout item that displays an image. |
| `Item` | A generic form item that contains properties common to all items, such as title and help text. |
| `ItemResponse` | A response to one question item within a form. |
| `ItemType` | An enum representing the supported types of form items. |
| `ListItem` | A question item that allows the respondent to select one choice from a drop-down list. |
| `MultipleChoiceItem` | A question item that allows the respondent to select one choice from a list of radio buttons or an optional "other" field. |
| `PageBreakItem` | A layout item that marks the start of a page. |
| `PageNavigationType` | An enum representing the supported types of page navigation. |
| `ParagraphTextItem` | A question item that allows the respondent to enter a block of text. |
| `ParagraphTextValidation` | A DataValidation for a `ParagraphTextItem`. |
| `ParagraphTextValidationBuilder` | A DataValidationBuilder for a `ParagraphTextValidation`. |
| `QuizFeedback` | Represents feedback that can be associated with gradable form items, containing properties like display text and helpful links. |
| `QuizFeedbackBuilder` | The base FeedbackBuilder that contains setters for properties common to all feedback, such as display text. |
| `RatingIconType` | An enum representing the supported types of rating icons. |
| `RatingItem` | A question item that allows the respondent to give a rating. |
| `ScaleItem` | A question item that allows the respondent to choose one option from a numbered sequence of radio buttons. |
| `SectionHeaderItem` | A layout item that visually indicates the start of a section. |
| `TextItem` | A question item that allows the respondent to enter a single line of text. |
| `TextValidation` | A DataValidation for a `TextItem`. |
| `TextValidationBuilder` | A DataValidationBuilder for a `TextValidation`. |
| `TimeItem` | A question item that allows the respondent to indicate a time of day. |
| `VideoItem` | A layout item that displays a video. |

## `Alignment`

### Properties

| Property | Type | Description |
|---|---|---|
| `LEFT` | `Enum` | Align the image to the left side of the form. |
| `CENTER` | `Enum` | Align the image to the center of the form. |
| `RIGHT` | `Enum` | Align the image to the right side of the form. |

## `CheckboxGridItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `clearValidation()` | `CheckboxGridItem` | Removes any data validation for this grid item. |
| `createResponse(responses)` | `ItemResponse` | Creates a new `ItemResponse` for this checkbox grid item. |
| `duplicate()` | `CheckboxGridItem` | Creates a copy of this item and appends it to the end of the form. |
| `getColumns()` | `String[]` | Gets the values for every column in the grid. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getRows()` | `String[]` | Gets the values for every row in the grid. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setColumns(columns)` | `CheckboxGridItem` | Sets the columns of the grid based on an array of values. |
| `setHelpText(text)` | `CheckboxGridItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setRequired(enabled)` | `CheckboxGridItem` | Sets whether the respondent must answer the question. |
| `setRows(rows)` | `CheckboxGridItem` | Sets the rows of the grid based on an array of values. |
| `setTitle(title)` | `CheckboxGridItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setValidation(validation)` | `CheckboxGridItem` | Sets the data validation for this checkbox grid item. |

## `CheckboxGridValidation`

## `CheckboxGridValidationBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `requireLimitOneResponsePerColumn()` | `CheckboxGridValidationBuilder` | Requires limit of one response per column for a grid item. |

## `CheckboxItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `clearValidation()` | `CheckboxItem` | Removes any data validation for this checkbox item. |
| `createChoice(value)` | `Choice` | Creates a new choice. |
| `createChoice(value, isCorrect)` | `Choice` | Creates a new choice. |
| `createResponse(responses)` | `ItemResponse` | Creates a new `ItemResponse` for this checkbox item. |
| `duplicate()` | `CheckboxItem` | Creates a copy of this item and appends it to the end of the form. |
| `getChoices()` | `Choice[]` | Gets all choices for an item. |
| `getFeedbackForCorrect()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond correctly to a question. |
| `getFeedbackForIncorrect()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond incorrectly to a question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `hasOtherOption()` | `Boolean` | Determines whether the item has an "other" option. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setChoiceValues(values)` | `CheckboxItem` | Sets the choices for an item from an array of strings. |
| `setChoices(choices)` | `CheckboxItem` | Sets an array of choices for an item. |
| `setFeedbackForCorrect(feedback)` | `CheckboxItem` | Sets the feedback to be shown to respondents when they respond correctly to a question. |
| `setFeedbackForIncorrect(feedback)` | `CheckboxItem` | Sets the feedback to be shown to respondents when they respond incorrectly to a question. |
| `setHelpText(text)` | `CheckboxItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `CheckboxItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `CheckboxItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `CheckboxItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setValidation(validation)` | `CheckboxItem` | Sets the data validation for this checkbox item. |
| `showOtherOption(enabled)` | `CheckboxItem` | Sets whether the item has an "other" option. |

## `CheckboxValidation`

## `CheckboxValidationBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `requireSelectAtLeast(number)` | `CheckboxValidationBuilder` | Require at least this many choices to be selected. |
| `requireSelectAtMost(number)` | `CheckboxValidationBuilder` | Require at most this many choices to be selected. |
| `requireSelectExactly(number)` | `CheckboxValidationBuilder` | Require exactly this many choices to be selected. |

## `Choice`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `getGotoPage()` | `PageBreakItem` | Gets the `PageBreakItem` set as a `GO_TO_PAGE` destination if the responder selects this choice and completes the current page. |
| `getPageNavigationType()` | `PageNavigationType` | Gets the `PageNavigationType` that occurs if the responder selects this choice and completes the current page. |
| `getValue()` | `String` | Gets the choice's value, which respondents see as a label when viewing the form. |
| `isCorrectAnswer()` | `Boolean` | Gets whether the choice is a correct answer for the question. |

## `DateItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this date item. |
| `duplicate()` | `DateItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `includesYear()` | `Boolean` | Determines whether the date item includes a year option. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `DateItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `DateItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setIncludesYear(enableYear)` | `DateItem` | Sets whether the date item includes a year setting. |
| `setPoints(points)` | `DateItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `DateItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `DateItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `DateTimeItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this date-time item. |
| `duplicate()` | `DateTimeItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `includesYear()` | `Boolean` | Determines whether the date item includes a year option. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `DateTimeItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `DateTimeItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setIncludesYear(enableYear)` | `DateTimeItem` | Sets whether the date item includes a year setting. |
| `setPoints(points)` | `DateTimeItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `DateTimeItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `DateTimeItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `DestinationType`

### Properties

| Property | Type | Description |
|---|---|---|
| `SPREADSHEET` | `Enum` | A Google Sheets spreadsheet as a destination for form responses. |

## `DurationItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createResponse(hours, minutes, seconds)` | `ItemResponse` | Creates a new `ItemResponse` for this date item. |
| `duplicate()` | `DurationItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `DurationItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `DurationItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `DurationItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `DurationItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `DurationItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `FeedbackType`

### Properties

| Property | Type | Description |
|---|---|---|
| `CORRECT` | `Enum` | Feedback that is automatically displayed to respondents for a question answered correctly. |
| `INCORRECT` | `Enum` | Feedback that is automatically displayed to respondents for a question answered incorrectly. |
| `GENERAL` | `Enum` | Feedback that is automatically displayed to respondents when they submit their response. |

## `Form`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addCheckboxGridItem()` | `CheckboxGridItem` | Appends a new 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. |
| `addCheckboxItem()` | `CheckboxItem` | Appends a new question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field. |
| `addDateItem()` | `DateItem` | Appends a new question item that allows the respondent to indicate a date. |
| `addDateTimeItem()` | `DateTimeItem` | Appends a new question item that allows the respondent to indicate a date and time. |
| `addDurationItem()` | `DurationItem` | Appends a new question item that allows the respondent to indicate a length of time. |
| `addEditor(emailAddress)` | `Form` | Adds the given user to the list of editors for the `Form`. |
| `addEditor(user)` | `Form` | Adds the given user to the list of editors for the `Form`. |
| `addEditors(emailAddresses)` | `Form` | Adds the given array of users to the list of editors for the `Form`. |
| `addGridItem()` | `GridItem` | Appends a new 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. |
| `addImageItem()` | `ImageItem` | Appends a new layout item that displays an image. |
| `addListItem()` | `ListItem` | Appends a new question item that allows the respondent to select one choice from a dropdown list. |
| `addMultipleChoiceItem()` | `MultipleChoiceItem` | Adds a new question item that allows the respondent to select one choice from a list of radio buttons or an optional "other" field. |
| `addPageBreakItem()` | `PageBreakItem` | Adds a new layout item that marks the start of a page. |
| `addParagraphTextItem()` | `ParagraphTextItem` | Adds a new question item that allows the respondent to enter a block of text. |
| `addPublishedReader(emailAddress)` | `Form` | Adds the given user to the list of responders for the `Form`. |
| `addPublishedReader(user)` | `Form` | Adds the given user to the list of responders for the `Form`. |
| `addPublishedReaders(emailAddresses)` | `Form` | Adds the given array of users to the list of responders for the `Form`. |
| `addRatingItem()` | `RatingItem` | Appends a new question item that allows the respondent to give a rating. |
| `addScaleItem()` | `ScaleItem` | Appends a new question item that allows the respondent to choose one option from a numbered sequence of radio buttons. |
| `addSectionHeaderItem()` | `SectionHeaderItem` | Appends a new layout item that visually indicates the start of a section. |
| `addTextItem()` | `TextItem` | Appends a new question item that allows the respondent to enter a single line of text. |
| `addTimeItem()` | `TimeItem` | Appends a new question item that allows the respondent to indicate a time of day. |
| `addVideoItem()` | `VideoItem` | Appends a new layout item that displays a video. |
| `canEditResponse()` | `Boolean` | Determines whether the form displays a link to edit a response after submitting it. |
| `collectsEmail()` | `Boolean` | Determines whether the form collects respondents' email addresses. |
| `createResponse()` | `FormResponse` | Creates a new response to the form. |
| `deleteAllResponses()` | `Form` | Deletes all submitted responses from the form's response store. |
| `deleteItem(index)` | `void` | Deletes the item at a given index among all the items in the form. |
| `deleteItem(item)` | `void` | Deletes the given item. |
| `deleteResponse(responseId)` | `Form` | Deletes a single response from the form's response store. |
| `getConfirmationMessage()` | `String` | Gets the form's confirmation message. |
| `getCustomClosedFormMessage()` | `String` | Gets the custom message that is displayed if the form is not accepting responses, or an empty string if no custom message is set. |
| `getDescription()` | `String` | Gets the form's description. |
| `getDestinationId()` | `String` | Gets the ID of the form's response destination. |
| `getDestinationType()` | `DestinationType` | Gets the type of the form's response destination. |
| `getEditUrl()` | `String` | Gets the URL that can be used to access the form's edit mode. |
| `getEditors()` | `User[]` | Gets the list of editors for this `Form`. |
| `getId()` | `String` | Gets the ID of the form. |
| `getItemById(id)` | `Item|null` | Gets the item with a given ID. |
| `getItems()` | `Item[]` | Gets an array of all items in the form. |
| `getItems(itemType)` | `Item[]` | Gets an array of all items of a given type. |
| `getPublishedReaders()` | `User[]` | Gets the list of responders for this `Form`. |
| `getPublishedUrl()` | `String` | Gets the URL that can be used to respond to the form. |
| `getResponse(responseId)` | `FormResponse` | Gets a single form response based on its response ID. |
| `getResponses()` | `FormResponse[]` | Gets an array of all of the form's responses. |
| `getResponses(timestamp)` | `FormResponse[]` | Gets an array of all of the form's responses after a given date and time. |
| `getShuffleQuestions()` | `Boolean` | Determines whether the order of the questions on each page of the form is randomized. |
| `getSummaryUrl()` | `String` | Gets the URL that can be used to view a summary of the form's responses. |
| `getTitle()` | `String` | Gets the form's title. |
| `hasLimitOneResponsePerUser()` | `Boolean` | Determines whether the form allows only one response per respondent. |
| `hasProgressBar()` | `Boolean` | Determines whether the form displays a progress bar. |
| `hasRespondAgainLink()` | `Boolean` | Determines whether the form displays a link to submit another response after a respondent completes the form. |
| `isAcceptingResponses()` | `Boolean` | Determines whether the form is currently accepting responses. |
| `isPublished()` | `Boolean` | Determines whether the form is published. |
| `isPublishingSummary()` | `Boolean` | Determines whether the form displays a link to view a summary of responses after a respondent completes the form. |
| `isQuiz()` | `Boolean` | Determines whether the form is a quiz. |
| `moveItem(from, to)` | `Item` | Moves an item at a given index among all the items in the form to another given index. |
| `moveItem(item, toIndex)` | `Item` | Moves a given item to a given index among all the items in the form. |
| `removeDestination()` | `Form` | Unlinks the form from its current response destination. |
| `removeEditor(emailAddress)` | `Form` | Removes the given user from the list of editors for the `Form`. |
| `removeEditor(user)` | `Form` | Removes the given user from the list of editors for the `Form`. |
| `removePublishedReader(emailAddress)` | `Form` | Removes the given user from the list of responders for the `Form`. |
| `removePublishedReader(user)` | `Form` | Removes the given user from the list of responders for the `Form`. |
| `setAcceptingResponses(enabled)` | `Form` | Sets whether the form is currently accepting responses. |
| `setAllowResponseEdits(enabled)` | `Form` | Sets whether the form displays a link to edit a response after submitting it. |
| `setCollectEmail(collect)` | `Form` | Sets whether the form collects respondents' email addresses. |
| `setConfirmationMessage(message)` | `Form` | Sets the form's confirmation message. |
| `setCustomClosedFormMessage(message)` | `Form` | Sets the message to display if the form is not accepting responses. |
| `setDescription(description)` | `Form` | Sets the form's description. |
| `setDestination(type, id)` | `Form` | Sets the destination where form responses are saved. |
| `setIsQuiz(enabled)` | `Form` | Sets whether the form is a quiz. |
| `setLimitOneResponsePerUser(enabled)` | `Form` | Sets whether the form allows only one response per respondent. |
| `setProgressBar(enabled)` | `Form` | Sets whether the form has a progress bar. |
| `setPublished(enabled)` | `Form` | Sets whether the form is published. |
| `setPublishingSummary(enabled)` | `Form` | Sets whether the form displays a link to view a summary of responses after a respondent submits the form. |
| `setShowLinkToRespondAgain(enabled)` | `Form` | Sets whether the form displays a link to submit another response after a respondent completes the form. |
| `setShuffleQuestions(shuffle)` | `Form` | Sets whether the order of the questions on each page of the form is randomized. |
| `setTitle(title)` | `Form` | Sets the form's title. |
| `shortenFormUrl(url)` | `String` | Converts a long URL for a form to a short URL. |
| `submitGrades(responses)` | `Form` | Submits grades for the given FormResponses. |
| `supportsAdvancedResponderPermissions()` | `Boolean` | Determines whether the form supports publishing. |

## `FormApp`

### Properties

| Property | Type | Description |
|---|---|---|
| `Alignment` | `Alignment` | An enumeration of types of image alignment. |
| `DestinationType` | `DestinationType` | An enumeration of types of destinations that can store form responses. |
| `FeedbackType` | `FeedbackType` | An enumeration of types of form `Feedbacks`. |
| `ItemType` | `ItemType` | An enumeration of types of form `Items`. |
| `PageNavigationType` | `PageNavigationType` | An enumeration of possible behaviors for navigating pages. |
| `RatingIconType` | `RatingIconType` | An enumeration of rating icon types `RatingIcons` |

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `create(title)` | `Form` | Creates and returns a new `Form`. |
| `create(title, isPublished)` | `Form` | Creates and returns a new `Form` in the requested publish state. |
| `createCheckboxGridValidation()` | `CheckboxGridValidationBuilder` | Returns an instance of a CheckboxGridValidationBuilder which can be used to set validation on a `CheckboxGridItem`. |
| `createCheckboxValidation()` | `CheckboxValidationBuilder` | Returns an instance of a CheckboxValidationBuilder which can be used to set validation on a `CheckboxItem`. |
| `createFeedback()` | `QuizFeedbackBuilder` | Returns an instance of a QuizFeedbackBuilder which can be used to set feedback on a gradeable `Item`. |
| `createGridValidation()` | `GridValidationBuilder` | Returns an instance of a GridValidationBuilder which can be used to set validation on a `GridItem`. |
| `createParagraphTextValidation()` | `ParagraphTextValidationBuilder` | Returns an instance of a ParagraphTextValidationBuilder which can be used to set validation on a `ParagraphTextItem`. |
| `createTextValidation()` | `TextValidationBuilder` | Returns an instance of a TextValidationBuilder which can be used to set validation on a `TextItem`. |
| `getActiveForm()` | `Form` | Returns the form to which the script is [container-bound](https://developers.google.com/apps-script/scripts_containers). |
| `getUi()` | `Ui` | Returns an instance of the form editor's user-interface environment that allows the script to add features like menus, dialogs, and sidebars. |
| `openById(id)` | `Form` | Returns the `Form` with the specified ID. |
| `openByUrl(url)` | `Form` | Returns the `Form` with the specified URL. |

## `FormResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `getEditResponseUrl()` | `String` | Generates a URL that can be used to edit a response that has already been submitted. |
| `getGradableItemResponses()` | `ItemResponse[]` | Gets all item responses contained in a form response, in the same order that the items appear in the form. |
| `getGradableResponseForItem(item)` | `ItemResponse` | Gets the item response contained in a form response for a given item. |
| `getId()` | `String|null` | Gets the ID of the form response. |
| `getItemResponses()` | `ItemResponse[]` | Gets all item responses contained in a form response, in the same order that the items appear in the form. |
| `getRespondentEmail()` | `String` | Gets the email address of the person who submitted a response, if the `Form.setCollectEmail(collect)` setting is enabled. |
| `getResponseForItem(item)` | `ItemResponse` | Gets the item response contained in this form response for a given item. |
| `getTimestamp()` | `Date` | Gets the timestamp for a form response submission. |
| `submit()` | `FormResponse` | Submits the response. |
| `toPrefilledUrl()` | `String` | Generates a URL for the form in which the answers are pre-filled based on the answers in this form response. |
| `withItemGrade(gradedResponse)` | `FormResponse` | Adds the given item response's grades to a form response. |
| `withItemResponse(response)` | `FormResponse` | Adds the given item response to a form response. |

## `GridItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `clearValidation()` | `GridItem` | Removes any data validation for this grid item. |
| `createResponse(responses)` | `ItemResponse` | Creates a new `ItemResponse` for this grid item. |
| `duplicate()` | `GridItem` | Creates a copy of this item and appends it to the end of the form. |
| `getColumns()` | `String[]` | Gets the values for every column in the grid. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getRows()` | `String[]` | Gets the values for every row in the grid. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setColumns(columns)` | `GridItem` | Sets the columns of the grid based on an array of values. |
| `setHelpText(text)` | `GridItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setRequired(enabled)` | `GridItem` | Sets whether the respondent must answer the question. |
| `setRows(rows)` | `GridItem` | Sets the rows of the grid based on an array of values. |
| `setTitle(title)` | `GridItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setValidation(validation)` | `GridItem` | Sets the data validation for this grid item. |

## `GridValidation`

## `GridValidationBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `requireLimitOneResponsePerColumn()` | `GridValidationBuilder` | Requires limit of one response per column for a grid item. |

## `ImageItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `duplicate()` | `ImageItem` | Creates a copy of this item and appends it to the end of the form. |
| `getAlignment()` | `Alignment` | Gets the image's horizontal alignment. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getImage()` | `Blob` | Gets the image that is currently assigned to the item. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `getWidth()` | `Integer` | Gets the image's width in pixels. |
| `setAlignment(alignment)` | `ImageItem` | Sets the image's horizontal alignment. |
| `setHelpText(text)` | `ImageItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setImage(image)` | `ImageItem` | Sets the image itself. |
| `setTitle(title)` | `ImageItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setWidth(width)` | `ImageItem` | Sets the image's width in pixels. |

## `Item`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `asCheckboxGridItem()` | `CheckboxGridItem` | Returns the item as a checkbox grid item. |
| `asCheckboxItem()` | `CheckboxItem` | Returns the item as a checkbox item. |
| `asDateItem()` | `DateItem` | Returns the item as a date item. |
| `asDateTimeItem()` | `DateTimeItem` | Returns the item as a date-time item. |
| `asDurationItem()` | `DurationItem` | Returns the item as a duration item. |
| `asGridItem()` | `GridItem` | Returns the item as a grid item. |
| `asImageItem()` | `ImageItem` | Returns the item as an image item. |
| `asListItem()` | `ListItem` | Returns the item as a list item. |
| `asMultipleChoiceItem()` | `MultipleChoiceItem` | Returns the item as a multiple-choice item. |
| `asPageBreakItem()` | `PageBreakItem` | Returns the item as a page-break item. |
| `asParagraphTextItem()` | `ParagraphTextItem` | Returns the item as a paragraph-text item. |
| `asRatingItem()` | `RatingItem` | Returns the item as a rating item. |
| `asScaleItem()` | `ScaleItem` | Returns the item as a scale item. |
| `asSectionHeaderItem()` | `SectionHeaderItem` | Returns the item as a section-header item. |
| `asTextItem()` | `TextItem` | Returns the item as a text item. |
| `asTimeItem()` | `TimeItem` | Returns the item as a time item. |
| `asVideoItem()` | `VideoItem` | Returns the item as a video item. |
| `duplicate()` | `Item` | Creates a copy of this item and appends it to the end of the form. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `setHelpText(text)` | `Item` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setTitle(title)` | `Item` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `ItemResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `getFeedback()` | `Object` | Gets the feedback that was given for the respondent's submitted answer. |
| `getItem()` | `Item` | Gets the question item that this response answers. |
| `getResponse()` | `Object` | Gets the answer that the respondent submitted. |
| `getScore()` | `Object` | Gets the score for the respondent's submitted answer. |
| `setFeedback(feedback)` | `ItemResponse` | Sets the feedback that should be displayed for the respondent's submitted answer. |
| `setScore(score)` | `ItemResponse` | Sets the score for the respondent's submitted answer. |

## `ItemType`

### Properties

| Property | Type | Description |
|---|---|---|
| `CHECKBOX` | `Enum` | A question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field. |
| `CHECKBOX_GRID` | `Enum` | A 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. |
| `DATE` | `Enum` | A question item that allows the respondent to indicate a date. |
| `DATETIME` | `Enum` | A question item that allows the respondent to indicate a date and time. |
| `DURATION` | `Enum` | A question item that allows the respondent to indicate a length of time. |
| `GRID` | `Enum` | A 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. |
| `IMAGE` | `Enum` | A layout item that displays an image. |
| `LIST` | `Enum` | A question item that allows the respondent to select one choice from a drop-down list. |
| `MULTIPLE_CHOICE` | `Enum` | A question item that allows the respondent to select one choice from a list of radio buttons or an optional "other" field. |
| `PAGE_BREAK` | `Enum` | A layout item that marks the start of a page. |
| `PARAGRAPH_TEXT` | `Enum` | A question item that allows the respondent to enter a block of text. |
| `RATING` | `Enum` | A question item that allows the respondent to give a rating. |
| `SCALE` | `Enum` | A question item that allows the respondent to choose one option from a numbered sequence of radio buttons. |
| `SECTION_HEADER` | `Enum` | A layout item that visually indicates the start of a section. |
| `TEXT` | `Enum` | A question item that allows the respondent to enter a single line of text. |
| `TIME` | `Enum` | A question item that allows the respondent to indicate a time of day. |
| `VIDEO` | `Enum` | A layout item that displays a YouTube video. |
| `FILE_UPLOAD` | `Enum` | A question item that lets the respondent upload a file. |
| `UNSUPPORTED` | `Enum` | An item that is currently not supported through APIs. |

## `ListItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createChoice(value)` | `Choice` | Creates a new choice. |
| `createChoice(value, isCorrect)` | `Choice` | Creates a new choice. |
| `createChoice(value, navigationItem)` | `Choice` | Creates a new choice with a page-navigation option that jumps to a given page-break item. |
| `createChoice(value, navigationType)` | `Choice` | Creates a new choice with a page-navigation option. |
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this list item. |
| `duplicate()` | `ListItem` | Creates a copy of this item and appends it to the end of the form. |
| `getChoices()` | `Choice[]` | Gets all choices for an item. |
| `getFeedbackForCorrect()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond correctly to a question. |
| `getFeedbackForIncorrect()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond incorrectly to a question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setChoiceValues(values)` | `ListItem` | Sets the choices for an item from an array of strings. |
| `setChoices(choices)` | `ListItem` | Sets an array of choices for an item. |
| `setFeedbackForCorrect(feedback)` | `ListItem` | Sets the feedback to be shown to respondents when they respond correctly to a question. |
| `setFeedbackForIncorrect(feedback)` | `ListItem` | Sets the feedback to be shown to respondents when they respond incorrectly to a question. |
| `setHelpText(text)` | `ListItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `ListItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `ListItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `ListItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `MultipleChoiceItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createChoice(value)` | `Choice` | Creates a new choice. |
| `createChoice(value, isCorrect)` | `Choice` | Creates a new choice. |
| `createChoice(value, navigationItem)` | `Choice` | Creates a new choice with a page-navigation option that jumps to a given page-break item. |
| `createChoice(value, navigationType)` | `Choice` | Creates a new choice with a page-navigation option. |
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this multiple-choice item. |
| `duplicate()` | `MultipleChoiceItem` | Creates a copy of this item and appends it to the end of the form. |
| `getChoices()` | `Choice[]` | Gets all choices for an item. |
| `getFeedbackForCorrect()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond correctly to a question. |
| `getFeedbackForIncorrect()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond incorrectly to a question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `hasOtherOption()` | `Boolean` | Determines whether the item has an "other" option. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setChoiceValues(values)` | `MultipleChoiceItem` | Sets the choices for an item from an array of strings. |
| `setChoices(choices)` | `MultipleChoiceItem` | Sets an array of choices for an item. |
| `setFeedbackForCorrect(feedback)` | `MultipleChoiceItem` | Sets the feedback to be shown to respondents when they respond correctly to a question. |
| `setFeedbackForIncorrect(feedback)` | `MultipleChoiceItem` | Sets the feedback to be shown to respondents when they respond incorrectly to a question. |
| `setHelpText(text)` | `MultipleChoiceItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `MultipleChoiceItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `MultipleChoiceItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `MultipleChoiceItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `showOtherOption(enabled)` | `MultipleChoiceItem` | Sets whether the item has an "other" option. |

## `PageBreakItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `duplicate()` | `PageBreakItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGoToPage()` | `PageBreakItem` | Gets the `PageBreakItem` that the form will jump to after completing the page before this page break (that is, upon reaching this page break by normal linear progression through the form). |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPageNavigationType()` | `PageNavigationType` | Gets the type of page navigation that occurs after completing the page before this page break (that is, upon reaching this page break by normal linear progression through the form). |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `setGoToPage(goToPageItem)` | `PageBreakItem` | Sets the page to jump to after completing the page before this page break (that is, upon reaching this page break by normal linear progression through the form). |
| `setGoToPage(navigationType)` | `PageBreakItem` | Sets the type of page navigation that occurs after completing the page before this page break (that is, upon reaching this page break by normal linear progression through the form). |
| `setHelpText(text)` | `PageBreakItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setTitle(title)` | `PageBreakItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `PageNavigationType`

### Properties

| Property | Type | Description |
|---|---|---|
| `CONTINUE` | `Enum` | Continue to the next page of the form after completing the current page. |
| `GO_TO_PAGE` | `Enum` | Jump to a specified page of the form after completing the current page. |
| `RESTART` | `Enum` | Restart the form from the beginning, without clearing answers entered so far, after completing the current page. |
| `SUBMIT` | `Enum` | Submit the form response after completing the current page. |

## `ParagraphTextItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `clearValidation()` | `ParagraphTextItem` | Removes any data validation for this paragraph text item. |
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this paragraph text item. |
| `duplicate()` | `ParagraphTextItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `ParagraphTextItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `ParagraphTextItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `ParagraphTextItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `ParagraphTextItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `ParagraphTextItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setValidation(validation)` | `ParagraphTextItem` | Sets the data validation for this paragraph text item. |

## `ParagraphTextValidation`

## `ParagraphTextValidationBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `requireTextContainsPattern(pattern)` | `ParagraphTextValidationBuilder` | Requires response to contain pattern. |
| `requireTextDoesNotContainPattern(pattern)` | `ParagraphTextValidationBuilder` | Requires response to not contain pattern. |
| `requireTextDoesNotMatchPattern(pattern)` | `ParagraphTextValidationBuilder` | Requires response to not match pattern. |
| `requireTextLengthGreaterThanOrEqualTo(number)` | `ParagraphTextValidationBuilder` | Requires response length to be greater than or equal to value. |
| `requireTextLengthLessThanOrEqualTo(number)` | `ParagraphTextValidationBuilder` | Requires response length to be less than value. |
| `requireTextMatchesPattern(pattern)` | `ParagraphTextValidationBuilder` | Requires response to match pattern. |

## `QuizFeedback`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `getLinkUrls()` | `String[]` | Gets a list of the URLs associated with the Feedback. |
| `getText()` | `String` | Gets the Feedback's display text. |

## `QuizFeedbackBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addLink(url)` | `QuizFeedbackBuilder` | Adds a link to the feedback's supplemental material. |
| `addLink(url, displayText)` | `QuizFeedbackBuilder` | Adds a link to the feedback's supplemental material. |
| `build()` | `QuizFeedback` | Builds a Feedback of the corresponding type for this builder. |
| `copy()` | `QuizFeedbackBuilder` | Returns a copy of this builder. |
| `setText(text)` | `QuizFeedbackBuilder` | Sets the feedback text. |

## `RatingIconType`

### Properties

| Property | Type | Description |
|---|---|---|
| `STAR` | `Enum` | A star icon. |
| `HEART` | `Enum` | A heart icon. |
| `THUMB_UP` | `Enum` | A thumb up icon. |

## `RatingItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this rating item. |
| `duplicate()` | `RatingItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getRatingIcon()` | `RatingIconType` | Gets the icon chosen for the rating. |
| `getRatingScaleLevel()` | `Integer` | Gets the rating's scale level. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `RatingItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `RatingItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `RatingItem` | Sets the number of points a gradeable item is worth. |
| `setRatingIcon(ratingIcon)` | `RatingItem` | Sets the rating's icon. |
| `setRatingScaleLevel(ratingScaleLevel)` | `RatingItem` | Sets the rating's maximum scale level. |
| `setRequired(enabled)` | `RatingItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `RatingItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `ScaleItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this scale item. |
| `duplicate()` | `ScaleItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getLeftLabel()` | `String` | Gets the label for the scale's lower bound, if any. |
| `getLowerBound()` | `Integer` | Gets the scale's lower bound. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getRightLabel()` | `String` | Gets the label for the scale's upper bound, if any. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `getUpperBound()` | `Integer` | Gets the scale's upper bound. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setBounds(lower, upper)` | `ScaleItem` | Sets the scale's lower and upper bounds. |
| `setGeneralFeedback(feedback)` | `ScaleItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `ScaleItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setLabels(lower, upper)` | `ScaleItem` | Sets labels for the scale's lower and upper bounds. |
| `setPoints(points)` | `ScaleItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `ScaleItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `ScaleItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `SectionHeaderItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `duplicate()` | `SectionHeaderItem` | Creates a copy of this item and appends it to the end of the form. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `setHelpText(text)` | `SectionHeaderItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setTitle(title)` | `SectionHeaderItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `TextItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `clearValidation()` | `TextItem` | Removes any data validation for this text item. |
| `createResponse(response)` | `ItemResponse` | Creates a new `ItemResponse` for this text item. |
| `duplicate()` | `TextItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `TextItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `TextItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `TextItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `TextItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `TextItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setValidation(validation)` | `TextItem` | Sets the data validation for this text item. |

## `TextValidation`

## `TextValidationBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `requireNumber()` | `TextValidationBuilder` | Requires text item to be a number. |
| `requireNumberBetween(start, end)` | `TextValidationBuilder` | Requires text item to be a number between start and end, inclusive. |
| `requireNumberEqualTo(number)` | `TextValidationBuilder` | Requires text item to be a number equal to value specified. |
| `requireNumberGreaterThan(number)` | `TextValidationBuilder` | Requires text item to be a number greater than the value specified. |
| `requireNumberGreaterThanOrEqualTo(number)` | `TextValidationBuilder` | Requires text item to be a number greater than or equal to the value specified. |
| `requireNumberLessThan(number)` | `TextValidationBuilder` | Requires text item to be a number less than the value specified. |
| `requireNumberLessThanOrEqualTo(number)` | `TextValidationBuilder` | Requires text item to be a number less than or equal to the value specified. |
| `requireNumberNotBetween(start, end)` | `TextValidationBuilder` | Requires text item to be a number not between start and end, inclusive. |
| `requireNumberNotEqualTo(number)` | `TextValidationBuilder` | Requires text item to be a number not equal to the value specified. |
| `requireTextContainsPattern(pattern)` | `TextValidationBuilder` | Requires response to contain pattern. |
| `requireTextDoesNotContainPattern(pattern)` | `TextValidationBuilder` | Requires response to not contain pattern. |
| `requireTextDoesNotMatchPattern(pattern)` | `TextValidationBuilder` | Requires response to not match pattern. |
| `requireTextIsEmail()` | `TextValidationBuilder` | Requires text item to be an email address. |
| `requireTextIsUrl()` | `TextValidationBuilder` | Requires text item to be a URL. |
| `requireTextLengthGreaterThanOrEqualTo(number)` | `TextValidationBuilder` | Requires response length to be greater than or equal to value. |
| `requireTextLengthLessThanOrEqualTo(number)` | `TextValidationBuilder` | Requires response length to be less than value. |
| `requireTextMatchesPattern(pattern)` | `TextValidationBuilder` | Requires response to match pattern. |
| `requireWholeNumber()` | `TextValidationBuilder` | Requires text item to be a whole number. |

## `TimeItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `createResponse(hour, minute)` | `ItemResponse` | Creates a new `ItemResponse` for this time item. |
| `duplicate()` | `TimeItem` | Creates a copy of this item and appends it to the end of the form. |
| `getGeneralFeedback()` | `QuizFeedback|null` | Returns the feedback that is shown to respondents when they respond to a gradeable question. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getPoints()` | `Integer` | Returns the point value of a gradeable item. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `isRequired()` | `Boolean` | Determines whether the respondent must answer the question. |
| `setGeneralFeedback(feedback)` | `TimeItem` | Sets the feedback to be shown to respondents when they respond to a gradeable question that doesn't have a correct or incorrect answer (ie questions that require manual grading). |
| `setHelpText(text)` | `TimeItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setPoints(points)` | `TimeItem` | Sets the number of points a gradeable item is worth. |
| `setRequired(enabled)` | `TimeItem` | Sets whether the respondent must answer the question. |
| `setTitle(title)` | `TimeItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |

## `VideoItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `duplicate()` | `VideoItem` | Creates a copy of this item and appends it to the end of the form. |
| `getAlignment()` | `Alignment` | Gets the video's horizontal alignment. |
| `getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `getId()` | `Integer` | Gets the item's unique identifier. |
| `getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `getType()` | `ItemType` | Gets the item's type, represented as an `ItemType`. |
| `getWidth()` | `Integer` | Gets the video's width in pixels. |
| `setAlignment(alignment)` | `VideoItem` | Sets the video's horizontal alignment. |
| `setHelpText(text)` | `VideoItem` | Sets the item's help text (sometimes called description text for layout items like `ImageItems`, `PageBreakItems`, and `SectionHeaderItems`). |
| `setTitle(title)` | `VideoItem` | Sets the item's title (sometimes called header text, in the case of a `SectionHeaderItem`). |
| `setVideoUrl(youtubeUrl)` | `VideoItem` | Sets the video itself from a given YouTube URL or YouTube video ID. |
| `setWidth(width)` | `VideoItem` | Sets the video's width in pixels. |