From 42ec8d5fc9fd75ee80f5e6605dbf9db846395692 Mon Sep 17 00:00:00 2001 From: DocuSeal Date: Sat, 21 Oct 2023 12:09:50 +0300 Subject: [PATCH] do not allow to skip required fields --- app/javascript/submission_form/form.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/javascript/submission_form/form.vue b/app/javascript/submission_form/form.vue index bfab5e91..f4ed999e 100644 --- a/app/javascript/submission_form/form.vue +++ b/app/javascript/submission_form/form.vue @@ -425,7 +425,7 @@ export default { allowToSkip: { type: Boolean, required: false, - default: true + default: false }, goToLast: { type: Boolean, @@ -461,7 +461,6 @@ export default { currentStep: 0, isSubmitting: false, submittedValues: {}, - isSecondWalkthrough: false, recalculateButtonDisabledKey: '' } }, @@ -662,7 +661,7 @@ export default { stepPromise().then(async () => { const emptyRequiredField = this.stepFields.find((fields, index) => { - return index < this.currentStep && fields[0].required && (fields[0].type === 'phone' || !this.allowToSkip || !this.isSecondWalkthrough) && !this.submittedValues[fields[0].uuid] + return index < this.currentStep && fields[0].required && (fields[0].type === 'phone' || !this.allowToSkip) && !this.submittedValues[fields[0].uuid] }) const formData = new FormData(this.$refs.form)