您好我正在使用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
};