Auto save form response based on form config (#217)

* Auto save form response based on form config

* Move confetti and autosave to customization

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2023-10-12 16:56:02 +05:30
committed by GitHub
parent 30aee7813c
commit a297f2db50
8 changed files with 56 additions and 23 deletions

View File

@@ -224,7 +224,7 @@ export default {
dataForm: {
deep: true,
handler() {
if (this.isPublicFormPage && this.form && this.dataFormValue) {
if (this.isPublicFormPage && this.form && this.form.auto_save && this.dataFormValue) {
try {
window.localStorage.setItem(this.formPendingSubmissionKey, JSON.stringify(this.dataFormValue))
} catch (e) {
@@ -310,7 +310,7 @@ export default {
}
}
}
if (this.isPublicFormPage) {
if (this.isPublicFormPage && this.form.auto_save) {
let pendingData
try {
pendingData = window.localStorage.getItem(this.formPendingSubmissionKey)