PageBreakItem

A layout item that marks the start of a page. Items can be accessed or created from a `https://developers.google.com/apps-script/reference/forms/form`.

```javascript
// Create a form and add three page-break items.
const form = FormApp.create('Form Name');
const pageTwo = form.addPageBreakItem().setTitle('Page Two');
const pageThree = form.addPageBreakItem().setTitle('Page Three');

// Make the first two pages navigate elsewhere upon completion.
pageTwo.setGoToPage(
    pageThree);  // At end of page one (start of page two), jump to page three
pageThree.setGoToPage(
    FormApp.PageNavigationType.RESTART);  // At end of page two, restart form
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/forms/page-break-item#duplicate()` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | Creates a copy of this item and appends it to the end of the form. |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getGoToPage()` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | Gets the `https://developers.google.com/apps-script/reference/forms/page-break-item#` 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). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getHelpText()` | `String` | Gets the item's help text (sometimes called description text for layout items like `https://developers.google.com/apps-script/reference/forms/image-item`, `https://developers.google.com/apps-script/reference/forms/page-break-item#`, and `https://developers.google.com/apps-script/reference/forms/section-header-item`). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getId()` | `Integer` | Gets the item's unique identifier. |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getIndex()` | `Integer` | Gets the index of the item among all the items in the form. |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getPageNavigationType()` | `https://developers.google.com/apps-script/reference/forms/page-navigation-type` | 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). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getTitle()` | `String` | Gets the item's title (sometimes called header text, in the case of a `https://developers.google.com/apps-script/reference/forms/section-header-item`). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#getType()` | `https://developers.google.com/apps-script/reference/forms/item-type` | Gets the item's type, represented as an `https://developers.google.com/apps-script/reference/forms/item-type`. |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#setGoToPage(PageBreakItem)` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | 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). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#setGoToPage(PageNavigationType)` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | 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). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#setHelpText(String)` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | Sets the item's help text (sometimes called description text for layout items like `https://developers.google.com/apps-script/reference/forms/image-item`, `https://developers.google.com/apps-script/reference/forms/page-break-item#`, and `https://developers.google.com/apps-script/reference/forms/section-header-item`). |
| `https://developers.google.com/apps-script/reference/forms/page-break-item#setTitle(String)` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | Sets the item's title (sometimes called header text, in the case of a `https://developers.google.com/apps-script/reference/forms/section-header-item`). |

## Detailed documentation

### `duplicate()`

Creates a copy of this item and appends it to the end of the form.

#### Return


`https://developers.google.com/apps-script/reference/forms/page-break-item#` --- a duplicate of this `https://developers.google.com/apps-script/reference/forms/page-break-item#`, for chaining

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getGoToPage()`

Gets the `https://developers.google.com/apps-script/reference/forms/page-break-item#` 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).

#### Return


`https://developers.google.com/apps-script/reference/forms/page-break-item#` --- the page break to jump to after completing the page before this page break, or `null` if none is set

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getHelpText()`

Gets the item's help text (sometimes called description text for layout items like `https://developers.google.com/apps-script/reference/forms/image-item`, `https://developers.google.com/apps-script/reference/forms/page-break-item#`, and `https://developers.google.com/apps-script/reference/forms/section-header-item`).

#### Return


`String` --- the item's help text or description text

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getId()`

Gets the item's unique identifier.

#### Return


`Integer` --- the item's ID

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getIndex()`

Gets the index of the item among all the items in the form.

#### Return


`Integer` --- the index of the item

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getPageNavigationType()`

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).

#### Return


`https://developers.google.com/apps-script/reference/forms/page-navigation-type` --- the navigation action to take after completing the page before this page break

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getTitle()`

Gets the item's title (sometimes called header text, in the case of a `https://developers.google.com/apps-script/reference/forms/section-header-item`).

#### Return


`String` --- the item's title or header text

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `getType()`

Gets the item's type, represented as an `https://developers.google.com/apps-script/reference/forms/item-type`.

#### Return


`https://developers.google.com/apps-script/reference/forms/item-type` --- the item's type

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `setGoToPage(goToPageItem)`

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). If the previous page
contained a `https://developers.google.com/apps-script/reference/forms/multiple-choice-item` or `https://developers.google.com/apps-script/reference/forms/list-item` with a navigation option, that
navigation overrules this navigation.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `goToPageItem` | `https://developers.google.com/apps-script/reference/forms/page-break-item#` | the page break to jump to after completing the page before this page break |

#### Return


`https://developers.google.com/apps-script/reference/forms/page-break-item#` --- this `https://developers.google.com/apps-script/reference/forms/page-break-item#`, for chaining

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `setGoToPage(navigationType)`

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). If the
page contained a `https://developers.google.com/apps-script/reference/forms/multiple-choice-item` or `https://developers.google.com/apps-script/reference/forms/list-item` with a navigation option, that
navigation overrules this navigation.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `navigationType` | `https://developers.google.com/apps-script/reference/forms/page-navigation-type` | the navigation action to take after completing the page before this page break |

#### Return


`https://developers.google.com/apps-script/reference/forms/page-break-item#` --- this `https://developers.google.com/apps-script/reference/forms/page-break-item#`, for chaining

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `setHelpText(text)`

Sets the item's help text (sometimes called description text for layout items like `https://developers.google.com/apps-script/reference/forms/image-item`, `https://developers.google.com/apps-script/reference/forms/page-break-item#`, and `https://developers.google.com/apps-script/reference/forms/section-header-item`).

#### Parameters

| Name | Type | Description |
|---|---|---|
| `text` | `String` | the new help text |

#### Return


`https://developers.google.com/apps-script/reference/forms/page-break-item#` --- this `https://developers.google.com/apps-script/reference/forms/page-break-item#`, for chaining

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`

*** ** * ** ***

### `setTitle(title)`

Sets the item's title (sometimes called header text, in the case of a `https://developers.google.com/apps-script/reference/forms/section-header-item`).

#### Parameters

| Name | Type | Description |
|---|---|---|
| `title` | `String` | the new title or header text |

#### Return


`https://developers.google.com/apps-script/reference/forms/page-break-item#` --- this `https://developers.google.com/apps-script/reference/forms/page-break-item#`, for chaining

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/forms.currentonly`
- `https://www.googleapis.com/auth/forms`