Enum PageNavigationType

PageNavigationType

列舉代表支援的網頁導覽類型。網頁導覽類型可以是 存取日期:FormApp.PageNavigationType

頁面導覽是指在作答者完成含有選項的網頁後開始。 只有在作答者選擇該選項時才會出現如果作答者選擇多個選項 相同頁面上的網頁瀏覽指示,只有最後一個瀏覽選項會有任何效果。 網頁瀏覽機制也不會影響表單的最後一頁。

使用網頁導覽的選項無法在同一個項目與不使用的選項中合併 請使用網頁瀏覽

如要呼叫列舉,您可以呼叫其父項類別、名稱和屬性。例如 FormApp.PageNavigationType.CONTINUE

// Create a form and add a new multiple-choice item and a page-break item.
const form = FormApp.create('Form Name');
const item = form.addMultipleChoiceItem();
const pageBreak = form.addPageBreakItem();

// Set some choices with go-to-page logic.
const rightChoice = item.createChoice(
    'Vanilla',
    FormApp.PageNavigationType.SUBMIT,
);
const 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.
const iffyChoice = item.createChoice('Peanut', pageBreak);
const otherChoice = item.createChoice(
    'Strawberry',
    FormApp.PageNavigationType.CONTINUE,
);
item.setChoices([rightChoice, wrongChoice, iffyChoice, otherChoice]);

屬性

屬性類型說明
CONTINUEEnum完成目前頁面後,繼續前往表單的下一頁。
GO_TO_PAGEEnum完成目前頁面後,即可跳到表單的特定頁面。
RESTARTEnum從頭重新開始表單,但不要清除已輸入的答案 目前頁面的內容
SUBMITEnum完成目前的頁面後,提交表單回應。