0c9ea page break validation (#464)

* fix password reset bug

* page break precognition validation

* precognition validation tests

* fix: disable precogniton in form editor
This commit is contained in:
Favour Olayinka 2024-06-26 09:43:06 +01:00 committed by GitHub
parent a912a10145
commit 3226bef13f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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()