hCaptcha / hcaptcha-wordpress-plugin

hCaptcha.com support for Wordpress (Plugin)
GNU General Public License v2.0
80 stars 32 forks source link

Feature Request: Add configurable option `force` to the settings dashboard #324

Closed angelsvirkov closed 8 months ago

angelsvirkov commented 8 months ago

Hi everyone, thank you very much for the awesome plugin. It helps us a ton 🚀 .

I have recently seen that with version 3.10 you have added support for forcing hCaptcha upon form submission. This is extremely good, because for our users it was very confusing that they submit a form and the only indication they get that something failed is the plain text message "You must be a human to submit". Some people didn't even see the message and thought the form was processed.

Therefore, I am really happy with the new feature. Nevertheless, I can see that the option is disabled by default and the only way to turn it on is by adjusting the shortcode.

Feature Request: Make the force hCaptcha option configurable via the plugin settings dashboard.

Reason If I can currently only set the option to true via shortcode, I must use the short code on all forms where hCaptcha is used. I am currently using a default integration with Divi Contact Form via the integrations settings in the plugin. If I add the shortcode, this produces 2 hCaptcha boxes on one page because of the default global integration. Alternatively, if I disable the global integration and add the shortcode with the force attribute then I must add this to every form which is not the most pleasant thing since I have more than 5 forms where I have to duplicate that shortcode and make sure it is the same.

Therefore, I believe it can be useful to have a global settings option to set the force to true for all forms without having to go for individual shortcode manipulations.

Please let me know if there are any alternatives to the above described problem. I would be happy to know if a global settings is something you have already planned to introduce. Thanks.

kagg-design commented 8 months ago

Hi @angelsvirkov, thank you for your kind response.

The idea is good. I also thought about it but did not have time to implement and test it. Now, I am adding it to my plan for v4.0.0 and will leave feedback here.

kagg-design commented 8 months ago

So far, I have added the filter hcap_form_args. It gives full control of creating a form.

Adding a force option will demand extensive testing with all integrated plugins and their supported forms.

kagg-design commented 8 months ago

I have added the Force hCaptcha option. It does not support all integrations so far but works with Divi. The feature will be released with v4.0.0.