From 3226bef13ffd9d65f20722c935ccf0403a947552 Mon Sep 17 00:00:00 2001 From: Favour Olayinka Date: Wed, 26 Jun 2024 09:43:06 +0100 Subject: [PATCH] 0c9ea page break validation (#464) * fix password reset bug * page break precognition validation * precognition validation tests * fix: disable precogniton in form editor --- client/components/open/forms/OpenForm.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/components/open/forms/OpenForm.vue b/client/components/open/forms/OpenForm.vue index 52638d31..3ddf92bd 100644 --- a/client/components/open/forms/OpenForm.vue +++ b/client/components/open/forms/OpenForm.vue @@ -443,6 +443,11 @@ export default { return false }, nextPage() { + if (this.adminPreview) { + this.currentFieldGroupIndex += 1 + window.scrollTo({ top: 0, behavior: 'smooth' }) + return false + } const fieldsToValidate = this.currentFields.map(f => f.id) this.dataForm.busy = true this.dataForm.validate('POST', '/forms/' + this.form.slug + '/answer', {}, fieldsToValidate) @@ -453,7 +458,7 @@ export default { }).catch(err => { this.dataForm.busy = false }) - return false; + return false }, isFieldHidden(field) { return (new FormLogicPropertyResolver(field, this.dataFormValue)).isHidden()