サポートされているページ ナビゲーションのタイプを表す列挙型。ページ ナビゲーション タイプには Form
からアクセスできます。
ページ ナビゲーションは、回答者がオプションを含むページを完了した後に、回答者がそのオプションを選択した場合にのみ行われます。回答者が同じページでページ移動手順とともに複数のオプションを選択した場合、最後の移動オプションのみが有効になります。また、ページ ナビゲーションはフォームの最後のページにも影響しません。
ページ ナビゲーションを使用する選択肢と、ページ ナビゲーションを使用しない場合の選択肢を、同じアイテムに組み合わせることはできません。
列挙型を呼び出すには、その親クラス、名前、プロパティを呼び出します。たとえば、
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 | 現在のページの入力が完了したら、フォームの回答を送信します。 |