使用分页符时在Google表单中删除页面导航“后退按钮”

问题描述 投票:3回答:1

[嗨,我正在使用Google Apps脚本制作Google表单。我在问题之间插入分页符。不幸的是,这在问题下方同时创建了“返回”和“继续”按钮-我不想让用户返回到先前的响应并更改它们,只应允许他们在响应中向前(“继续”)前进。形成。因此,我希望删除“后退”按钮,或者至少删除用户编辑以分页符分隔的先前响应的功能。

我尝试设置.setAllowResponseEdits(false),但这无济于事。

我也尝试过设置PageNavigationTypes的设置,但是documentation不清楚,并且似乎没有访问后退按钮的方法。

这是我用于创建from的代码

// function to create form using previous responses
function createQuizTwo(uniqueID, previousResponses) {

  var newForm = FormApp.create(uniqueID + '_quizTwo');  // creates a new form for this user

  var newResponses = SpreadsheetApp.create(uniqueID + '_quizTwoResponses'); // creates a new spreadsheet to store responses for this user

  newForm.setDestination(FormApp.DestinationType.SPREADSHEET, newResponses.getId()) // connect form to spreadsheet
     .setTitle('a title')
     .setDescription('a description')
     .setConfirmationMessage('Thanks for taking part!')
     .setAllowResponseEdits(false)
     .setShowLinkToRespondAgain(false);

  for (var i=0; i<previousResponses.length;i++) {
    newForm.addTextItem().setTitle(String(previousResponses[i])).setRequired(true);
    var item = newForm.addScaleItem();
    item.setTitle('Please rate how confident you feel about this answer on a scale from 1-10.')
     .setBounds(1, 10);
    newForm.addPageBreakItem();
  }

  return newForm
};
google-apps-script google-form
1个回答
0
投票

我是GAS / JS的新手,但我想错了吗,因为有一个ID和一个特定的表单URL,我们应该能够运行一个通过JS禁用该按钮的脚本吗?尽管我的知识有限,但是我不确定在哪里输入该脚本以及如何编写。

我认为它将以某种方式使用DOM对象。

© www.soinside.com 2019 - 2024. All rights reserved.