Prevent double submitting in multi-step forms by updating the submitted property in handleSubmit

This commit is contained in:
leigh-mil 2020-02-11 13:21:49 -05:00
parent 4fb8d37746
commit 4802880cdb

View File

@ -55,6 +55,10 @@ export default {
return this.step === this.steps - 1 return this.step === this.steps - 1
}, },
handleSubmit: function(e) { handleSubmit: function(e) {
if (this._onLastPage) {
this.submitted = true
}
if (!this.validateFields() || !this._onLastPage()) { if (!this.validateFields() || !this._onLastPage()) {
e.preventDefault() e.preventDefault()
this.next() this.next()