Open ecaron opened 4 years ago
I'm working on a PR. My current idea involves https://calderaforms.com/doc/validation-events/ and modifying the state of obj.inst.validationResult to "wrap" the call.
Here's a gist that represents what I have in mind: https://gist.github.com/ecaron/da9087482b0cdfa587f762a608bb43cf Notable changes:
The gist has been updated (https://gist.github.com/ecaron/da9087482b0cdfa587f762a608bb43cf):
PR has been submitted: https://github.com/andrewlimaza/caldera-forms-anti-spam/pull/21
PR #21 solved the "reset captcha" for me. Hope this goes to the next update.
@andrewlimaza - any update on this?
The current implementation of
grecaptcha.execute
causes 2 problems:cf-recapv-token
is injected into the form multiple times.If we could adjust this plugin to block the caldera form submission, then execute the grecaptcha, then let the submission continue, the problem should go away.
The code in question is at https://github.com/andrewlimaza/caldera-forms-anti-spam/blob/a43164965aab9e30bc08f8e4f77cbd6ed84ab63a/fields/recaptcha/field.php#L58