Add JS event on submission
This commit is contained in:
parent
e473f28ea1
commit
2fcce79c3a
|
@ -204,6 +204,26 @@ export default {
|
||||||
form_id: this.form.id
|
form_id: this.form.id
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (this.isIframe) {
|
||||||
|
window.parent.postMessage({
|
||||||
|
type: 'form-submitted',
|
||||||
|
form: {
|
||||||
|
slug: this.form.slug,
|
||||||
|
id: this.form.id
|
||||||
|
},
|
||||||
|
submission_data: form.data()
|
||||||
|
}, '*')
|
||||||
|
} else {
|
||||||
|
window.postMessage({
|
||||||
|
type: 'form-submitted',
|
||||||
|
form: {
|
||||||
|
slug: this.form.slug,
|
||||||
|
id: this.form.id
|
||||||
|
},
|
||||||
|
submission_data: form.data()
|
||||||
|
}, '*')
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
window.localStorage.removeItem(this.formPendingSubmissionKey)
|
window.localStorage.removeItem(this.formPendingSubmissionKey)
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
Loading…
Reference in New Issue