From 71da812743cb38a9f398bc233f01c661ed23ed0a Mon Sep 17 00:00:00 2001 From: Italo Date: Fri, 24 Apr 2020 12:58:52 -0400 Subject: [PATCH] Should fix the form submission. --- resources/views/script.blade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/views/script.blade.php b/resources/views/script.blade.php index cb1f380..ff684b8 100644 --- a/resources/views/script.blade.php +++ b/resources/views/script.blade.php @@ -14,7 +14,7 @@ .forEach((form) => { let action = form.action.includes('://') ? (new URL(form.action)).pathname : form.action; form.addEventListener('submit', (event) => { - event.stopPropagation(); + event.preventDefault(); grecaptcha.execute(site_key, { action: action .substring(action.indexOf('?'), action.length) @@ -26,6 +26,7 @@ child.setAttribute('name', '_recaptcha'); child.setAttribute('value', token); form.appendChild(child); + form.submit(); } }); });