From 4802880cdb675b4025950337e43035e08e25e373 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Tue, 11 Feb 2020 13:21:49 -0500 Subject: [PATCH] Prevent double submitting in multi-step forms by updating the submitted property in handleSubmit --- js/components/forms/multi_step_modal_form.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/components/forms/multi_step_modal_form.js b/js/components/forms/multi_step_modal_form.js index 5cc5f4df..2cf20bba 100644 --- a/js/components/forms/multi_step_modal_form.js +++ b/js/components/forms/multi_step_modal_form.js @@ -55,6 +55,10 @@ export default { return this.step === this.steps - 1 }, handleSubmit: function(e) { + if (this._onLastPage) { + this.submitted = true + } + if (!this.validateFields() || !this._onLastPage()) { e.preventDefault() this.next()