我正在使用SurveyJS (https://surveyjs.io/)创建一个简单的站点,很少有问题。我能够用SurveyJS提供的选项来完成我的所有逻辑。
然而,我想做的是:
false**,,则不要移动到下一个问题。_(不工作)**_无论我做什么,调查都会继续转到下一个问题,在这种情况下,我想避免这样做。
有三个可用的回调:
// triggers before the current page goes away
survey.onCurrentPageChanging.add(function (sender, options) {
if(survey.data.year === "1991") {
// let's say I want to stop user from going forward at this point.
// how can I do that?
}
});
// triggers after the current page is gone and new page is about to appear
survey.onCurrentPageChanged.add(function (sender) {
});
// triggers right before the survey is about to finish - the last page
survey.onCompleting.add(function (sender, options) {
});谢谢您抽时间见我。
发布于 2018-12-03 07:26:32
survey.onCurrentPageChanging.add(function (sender, options) {
if(survey.data.year === "1991") {
// This prevents survey go to the next page
options.allowChanging = false;
}
});https://stackoverflow.com/questions/53588462
复制相似问题