Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible hCaptcha doesn't work #6

Open
creativesuspects opened this issue Jul 11, 2023 · 5 comments
Open

Invisible hCaptcha doesn't work #6

creativesuspects opened this issue Jul 11, 2023 · 5 comments

Comments

@creativesuspects
Copy link

The code in umbracoforms.invisible.hcaptcha.js doesn't work.

Line 21: This selector should use .umbraco-forms-form button[type=submit]:not(.cancel)

Lines 32-48: This code still contains some jQuery $(this).closest("form") and methods frm.validate() and frm.valid() that don't work.

Also, the hcaptcha.js script is not being loaded.

@AaronSadlerUK
Copy link
Contributor

Hi @creativesuspects!

We have this package running on several sites with no issues, please ensure you have updated to the latest version and updated all the static files.

Please provide example code for me to review to ensure you have configured it correctly, even better would be a link to a site with it installed.

@creativesuspects
Copy link
Author

creativesuspects commented Jul 11, 2023

Hi @AaronSadlerUK , thanks for the quick reply.

I've got the latest version (4.0.3) of the package installed on Umbraco 10.5.1. The normal and compact sizes work just fine out of the box, but when I use the invisible size the umbracoforms.invisible.hcaptcha.js script fails with the following error:

image

This script still seems to be depending on jQuery and the jQuery Validation Plugin:

image

Also, when I use the invisible size the hcaptcha.js script is not being loaded, which means the hcaptcha.execute() method on line 19 of umbracoforms.invisible.hcaptcha.js will not work:

image

And lastly, it would be great if you could make the query selector for the submit buttons more generic:

.umbraco-forms-form [type=submit]:not(.cancel)

instead of

.umbraco-forms-form input[type=submit]:not(.cancel)

I would like to replace the input elements by button elements in my theme, because I want to be able to add icons to my buttons. This would break the current query selector.

@creativesuspects
Copy link
Author

@AaronSadlerUK Are you available on Discord tomorrow? I would like to ask a few questions after which I might be able to help out with a PR.

@AaronSadlerUK
Copy link
Contributor

Invisible recaptcha is controlled through the api key for turnstile, invisible option in the backoffice shouldn't do anything for it.

I can be on Discord, what sort of time?

@creativesuspects
Copy link
Author

Anywhere between 10:00 and 18:00 CET. Let me know what works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants