列舉代表支援的網頁瀏覽類型。頁面導覽類型可從 FormApp.PageNavigationType
存取。
作答者完成含有選項的頁面後,且只有在作答者選擇該選項時,系統才會瀏覽頁面。如果作答者在同一個頁面上使用頁面瀏覽操作說明選擇多個選項,則只有最後一個導覽選項會生效。瀏覽頁面也不會影響表單的最後一個頁面。
使用網頁瀏覽的選項無法同時與不使用網頁瀏覽的選項合併。
如要呼叫列舉,您可以呼叫其父項類別、名稱和屬性。例如
FormApp.PageNavigationType.CONTINUE
。
// Create a form and add a new multiple-choice item and a page-break item. var form = FormApp.create('Form Name'); var item = form.addMultipleChoiceItem(); var pageBreak = form.addPageBreakItem(); // Set some choices with go-to-page logic. var rightChoice = item.createChoice('Vanilla', FormApp.PageNavigationType.SUBMIT); var wrongChoice = 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. var iffyChoice = item.createChoice('Peanut', pageBreak); var otherChoice = item.createChoice('Strawberry', FormApp.PageNavigationType.CONTINUE); item.setChoices([rightChoice, wrongChoice, iffyChoice, otherChoice]);
屬性
屬性 | 類型 | 說明 |
---|---|---|
CONTINUE | Enum | 完成目前頁面後,繼續前往表單的下一頁。 |
GO_TO_PAGE | Enum | 完成目前頁面後,跳至表單的特定頁面。 |
RESTART | Enum | 填妥目前頁面後,從頭開始重新啟動表單,不要清除目前輸入的答案。 |
SUBMIT | Enum | 完成當前頁面後提交表單。 |