Enum PageNavigationType

  • PageNavigationType is an enum representing supported types of page navigation in forms.

  • Page navigation occurs after completing a page with a chosen option containing a navigation instruction, with only the last instruction taking effect if multiple are chosen on the same page.

  • Choices using page navigation cannot be combined in the same item with choices that do not.

  • Page navigation has no effect on the last page of a form.

  • You call an enum likeFormApp.PageNavigationType.CONTINUE to use it.

PageNavigationType

An enum representing the supported types of page navigation. Page navigation types can beaccessed fromFormApp.PageNavigationType.

The page navigation occurs after the respondent completes a page that contains the option, andonly if the respondent chose that option. If the respondent chose multiple options withpage-navigation instructions on the same page, only the last navigation option has any effect.Page navigation also has no effect on the last page of a form.

Choices that use page navigation cannot be combined in the same item with choices that do notuse page navigation.

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

// Create a form and add a new multiple-choice item and a page-break item.constform=FormApp.create('Form Name');constitem=form.addMultipleChoiceItem();constpageBreak=form.addPageBreakItem();// Set some choices with go-to-page logic.constrightChoice=item.createChoice('Vanilla',FormApp.PageNavigationType.SUBMIT,);constwrongChoice=item.createChoice('Chocolate',FormApp.PageNavigationType.RESTART,);// For GO_TO_PAGE, just pass in the page break item. For CONTINUE (normally the// default), pass in CONTINUE explicitly because page navigation cannot be mixed// with non-navigation choices.constiffyChoice=item.createChoice('Peanut',pageBreak);constotherChoice=item.createChoice('Strawberry',FormApp.PageNavigationType.CONTINUE,);item.setChoices([rightChoice,wrongChoice,iffyChoice,otherChoice]);

Properties

PropertyTypeDescription
CONTINUEEnumContinue to the next page of the form after completing the current page.
GO_TO_PAGEEnumJump to a specified page of the form after completing the current page.
RESTARTEnumRestart the form from the beginning, without clearing answers entered so far, after completingthe current page.
SUBMITEnumSubmit the form response after completing the current page.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.