Enum PageNavigationType

PageNavigationType

表示支持的页面导航类型的枚举。可以从 FormApp.PageNavigationType 访问页面导航类型。

网页导航会在受访者完成包含此选项的网页后才进行,且仅当受访者选择了该选项时才会出现。如果受访者在同一页面上选择了多个包含页面导航说明的选项,则只有最后一个导航选项不会有任何影响。页面导航对表单的最后一页也没有任何影响。

使用页面导航的选项不能与未使用页面导航的选项合并在一起。

// 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]);

属性

属性类型说明
CONTINUEEnum完成当前页后,继续转到表单的下一页。
GO_TO_PAGEEnum填写完当前页面后,跳转到表单的指定页面。
RESTARTEnum完成当前页面后,从头开始填写表单,而不清除到目前为止已输入的答案。
SUBMITEnum填写完当前页面后提交表单回复。