diff --git a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js index 43c476ec..1f4bf90e 100644 --- a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js +++ b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js @@ -160,6 +160,13 @@ define( grecaptcha.execute(widgetId); event.preventDefault(event); event.stopImmediatePropagation(); + if (this.$parentForm.valid()) { + let formSubmitButton = this.$parentForm.find('button:not([type]), [type=submit]'); + + if (formSubmitButton.length) { //eslint-disable-line max-depth + formSubmitButton.attr('disabled', true); + } + } } }.bind(this));