form.isCaptchaEnabled always returns true #1317
Replies: 4 comments 4 replies
-
Hi @wolispace, Unfortunately I don't believe there is a way to check this. I will confirm with a developer, but in the meantime, I have noted this as a feature request. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Yes, form.isCaptchaEnabled always returning true does seem like a bug to me. |
Beta Was this translation helpful? Give feedback.
-
We will be adding support for this shortly in Freeform 5.x. Just an FYI 🙂 |
Beta Was this translation helpful? Give feedback.
-
This is now doable in Freeform 5.6+. 🙂 Use the integration handle for the check: |
Beta Was this translation helpful? Give feedback.
-
What happened?
Added an integration for reCAPTCHA and we want to conditionally display the "This site is protected by reCAPTCHA..." text based on whether the integration is enabled on the form.
There isn't any official documentation on how to check if captchas are enabled or not, but found this function that seems to be relavent.
craft-freeform/packages/plugin/src/Form/Form.php
Lines 289 to 296 in ac06755
Unfortunately this code will always show because the value is constantly true
I have tried toggling the integration within the form and even deleting all captcha integration in the freeform settings but nothing seems to change this value.
Errors and Stack Trace (if available)
No response
How can we reproduce this?
{% dd form.isCaptchaEnabled %}
Freeform Edition
Pro
Freeform Version
5.1.12
Craft Version
Craft Pro 4.9.4
When did this issue start?
Unsure
Previous Freeform Version
No response
Beta Was this translation helpful? Give feedback.
All reactions