do not allow to skip required fields

pull/133/head
DocuSeal 2 years ago
parent 01d752e811
commit 42ec8d5fc9

@ -425,7 +425,7 @@ export default {
allowToSkip: { allowToSkip: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: false
}, },
goToLast: { goToLast: {
type: Boolean, type: Boolean,
@ -461,7 +461,6 @@ export default {
currentStep: 0, currentStep: 0,
isSubmitting: false, isSubmitting: false,
submittedValues: {}, submittedValues: {},
isSecondWalkthrough: false,
recalculateButtonDisabledKey: '' recalculateButtonDisabledKey: ''
} }
}, },
@ -662,7 +661,7 @@ export default {
stepPromise().then(async () => { stepPromise().then(async () => {
const emptyRequiredField = this.stepFields.find((fields, index) => { 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) const formData = new FormData(this.$refs.form)

Loading…
Cancel
Save