Enum PageNavigationType

PageNavigationType

表示支持的网页导航类型的枚举。页面导航类型可以从 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]);

属性

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