Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #21 from DarkGhostHunter/master
Browse files Browse the repository at this point in the history
Should fix the form submission.
  • Loading branch information
DarkGhostHunter committed Apr 25, 2020
2 parents 68ff9c9 + 71da812 commit f234c8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/views/script.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -26,6 +26,7 @@
child.setAttribute('name', '_recaptcha');
child.setAttribute('value', token);
form.appendChild(child);
form.submit();
}
});
});
Expand Down

0 comments on commit f234c8e

Please sign in to comment.