Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Tipodinavigazionepagina
Un enum che rappresenta i tipi di navigazione tra le pagine supportati. Puoi accedere ai tipi di navigazione nelle pagine da FormApp.PageNavigationType.
La navigazione tra le pagine avviene dopo che il rispondente ha completato una pagina contenente l'opzione e solo se il rispondente ha scelto l'opzione. Se il rispondente ha scelto più opzioni con istruzioni di navigazione nella stessa pagina, ha effetto solo l'ultima opzione di navigazione.
La navigazione tra le pagine non ha alcun effetto neanche sull'ultima pagina di un modulo.
Le scelte che utilizzano la navigazione nelle pagine non possono essere combinate nello stesso elemento con le scelte che non la utilizzano.
Per chiamare un enum, devi chiamare la relativa classe, il nome e la proprietà di base. Ad esempio,
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]);
Proprietà
Proprietà
Tipo
Descrizione
CONTINUE
Enum
Vai alla pagina successiva del modulo dopo aver completato quella corrente.
GO_TO_PAGE
Enum
Vai a una pagina specifica del modulo dopo aver completato la pagina corrente.
RESTART
Enum
Riavviare il modulo dall'inizio, senza cancellare le risposte inserite fino a quel momento, dopo aver completato la pagina corrente.
SUBMIT
Enum
Invia la risposta al modulo dopo aver completato la pagina corrente.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003ePageNavigationType\u003c/code\u003e enables directing respondents to different pages or actions based on their choices in Google Forms.\u003c/p\u003e\n"],["\u003cp\u003eNavigation options include continuing to the next page, jumping to a specific page, restarting the form, or submitting the form.\u003c/p\u003e\n"],["\u003cp\u003eChoices with page navigation cannot be mixed with choices without navigation within the same form item.\u003c/p\u003e\n"],["\u003cp\u003eOnly the last navigation option selected on a page will be applied.\u003c/p\u003e\n"],["\u003cp\u003ePage navigation is ineffective on the last page of a form.\u003c/p\u003e\n"]]],[],null,["# Enum PageNavigationType\n\nPageNavigationType\n\nAn enum representing the supported types of page navigation. Page navigation types can be\naccessed from [FormApp.PageNavigationType](/apps-script/reference/forms/form-app#PageNavigationType).\n\nThe page navigation occurs after the respondent completes a page that contains the option, and\nonly if the respondent chose that option. If the respondent chose multiple options with\npage-navigation instructions on the same page, only the last navigation option has any effect.\nPage navigation also has no effect on the last page of a form.\n\nChoices that use page navigation cannot be combined in the same item with choices that do not\nuse page navigation.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nFormApp.PageNavigationType.CONTINUE`.\n\n```javascript\n// Create a form and add a new multiple-choice item and a page-break item.\nconst form = FormApp.create('Form Name');\nconst item = form.addMultipleChoiceItem();\nconst pageBreak = form.addPageBreakItem();\n\n// Set some choices with go-to-page logic.\nconst rightChoice = item.createChoice(\n 'Vanilla',\n FormApp.PageNavigationType.SUBMIT,\n);\nconst wrongChoice = item.createChoice(\n 'Chocolate',\n FormApp.PageNavigationType.RESTART,\n);\n\n// For GO_TO_PAGE, just pass in the page break item. For CONTINUE (normally the\n// default), pass in CONTINUE explicitly because page navigation cannot be mixed\n// with non-navigation choices.\nconst iffyChoice = item.createChoice('Peanut', pageBreak);\nconst otherChoice = item.createChoice(\n 'Strawberry',\n FormApp.PageNavigationType.CONTINUE,\n);\nitem.setChoices([rightChoice, wrongChoice, iffyChoice, otherChoice]);\n``` \n\n### Properties\n\n| Property | Type | Description |\n|--------------|--------|------------------------------------------------------------------------------------------------------------------|\n| `CONTINUE` | `Enum` | Continue to the next page of the form after completing the current page. |\n| `GO_TO_PAGE` | `Enum` | Jump to a specified page of the form after completing the current page. |\n| `RESTART` | `Enum` | Restart the form from the beginning, without clearing answers entered so far, after completing the current page. |\n| `SUBMIT` | `Enum` | Submit the form response after completing the current page. |"]]