表示支持的页面导航类型的枚举。网页导航类型
从 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]);
属性
| 属性 | 类型 | 说明 |
|---|---|---|
CONTINUE | Enum | 完成当前页面后继续前往表单的下一页。 |
GO_TO_PAGE | Enum | 完成当前页面后跳转到表单的指定页面。 |
RESTART | Enum | 填写完毕后,从头开始重新填写表单,而不清除到目前为止已输入的答案 当前页面 |
SUBMIT | Enum | 填写当前页面后提交表单回复。 |