Skip to content

Commit

Permalink
FORMS-881 - Not allow to save drafts if form validation fails (#1048)
Browse files Browse the repository at this point in the history
* fix: not allow to save drafts if form validation fails

* fix: make validation run on render for drafts. remove disable save draft button on validation fails
  • Loading branch information
bcvesalink authored Oct 20, 2023
1 parent d6858f6 commit 294c7d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/frontend/src/components/designer/FormViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ export default {
this.block = e;
},
formChange(e) {
// if draft check validation on render
if (this.submissionRecord.draft) {
this.$refs.chefForm.formio.checkValidity(null, true, null, false);
}
if (e.changed != undefined && !e.changed.flags.fromSubmission) {
this.formDataEntered = true;
}
Expand Down

0 comments on commit 294c7d9

Please sign in to comment.