Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[#5459] noCaptcha/reCaptcha required field warning

  • ahunt
  • ahunt
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 2 months ago - 9 years 2 months ago #269274 by ahunt
Dear CB support,

I've installed the google noCaptcha on my website and I have a question: when a field is marked as required, the CB module highlights it in red when it is skipped by the user and a "X This filed is required" is shown. I'd expect something similar to happen with the reCaptcha field if not filled/checked, instead I only get the form to reload without an explanation.
Is there a way to inform users that they forgot solving the the captcha check?

Thank you,
Adam.
Last edit: 9 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 2 months ago - 9 years 2 months ago #269288 by krileon
Replied by krileon on topic noCaptcha/reCaptcha required field warning
The captcha provided by CB AntiSpam does handle validation warnings, but it can't for Google reCaptcha. The reason for this is the reCaptcha HTML is contained in an iframe and provided by Google. CB isn't able to test it in browser using jQuery Validate and has to be done after the form has submitted. The other captcha modes will do as you're wanting as their entire output is done by CB AntiSpam it self.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • ahunt
  • ahunt
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 2 months ago #269294 by ahunt
Replied by ahunt on topic noCaptcha/reCaptcha required field warning
I see, thank you krileon.
I have users reporting that they had to submit the form twice or three times despite the instructions and the tool-tips showing the correct way to pass the captcha.
I believe that a sort of message needs to be displayed when the reCaptcha/noCaptcha is not completed. It doesn't matter if it is not a real-time thing as it happens with the other CB-fields, but it could be displayed at the form submission time. If no error = normal form submission workflow, else a html message can inform the user on the reason why the submission failed...
This is - of course - just my personal advice.

Thank you,
A.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 2 months ago #269296 by krileon
Replied by krileon on topic noCaptcha/reCaptcha required field warning
I already explained above why it can't do that. If you want captcha to do that then you can't use reCaptcha and need to use one of the other captcha modes provided by CB AntiSpam.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • ahunt
  • ahunt
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 2 months ago - 9 years 2 months ago #269310 by ahunt
Replied by ahunt on topic noCaptcha/reCaptcha required field warning
Dear krileon,

I really appreciate your fast responses and explanations.
It was pretty clear since the beginning and after your 1st reply: with captcha provided by CB, you are able to perform all the pre-checks and warnings are correctly displayed in case of blank input, now, let's move over.

What I am trying to say, and I guess you have a better knowledge than me on this, is that usually when a form containing a captcha is submitted, a sort of check on the content of the captcha variable value should be done. In particular, for the reCaptcha, the site-keys + other numbers are sent to google for validation. If the variable containing this "numbers" is empty, the user left the reCaptcha field blank/not-checked and this can be detected by a simple java script after submission.
Please forgive me if I look like I want to teach you how to do your job, I don't mean it. I am only trying to provide an input here to improve your product and my life - as other form modules (which are using reCapthca/noCaptcha) do test if the challenge has been skipped or not.
I don't expect, for the reasons you explained, to have this user warning in real-time but at least after the form submission.

As reCaptcha/noCaptcha seems to be the "standard" of the moment, and because CB is cleverly offering the option of using it, all I am asking for is that Community Builder module improves by better managing the inputs/outputs when using the reCapthca/noCaptcha.
Having the page reloaded without a reason, makes users (and admins) crazy.

For users of the joomlapolis community who wish to learn about how reCaptcha/noCaptcha works, these are some (of many) very good technical articles found on the internet:

webdesign.tutsplus.com/tutorials/how-to-integrate-no-captcha-recaptcha-in-your-website--cms-23024

developers.google.com/recaptcha/intro?hl=en

developers.google.com/recaptcha/old/docs/php?hl=en

Thank you very much indeed,
Adam.
Last edit: 9 years 2 months ago by ahunt.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 2 months ago - 9 years 2 months ago #269316 by krileon
Replied by krileon on topic noCaptcha/reCaptcha required field warning
I am well aware of how reCaptcha 2.0 API functions and its getResponse API call. The issue is not the API availability. The issue is hooking into jQuery Validate with an element that has no form element (it's just a div with an iframe in it), which means I've to completely write a new customized jQuery Validate rule specifically for it. The next issue is CB AntiSpam captcha has no idea where it's at or if it's even in a jQuery Validate powered form or even a form at all, which means I've well over a dozen locations to test the implementation in. There's also the issue of reliability of verify tokens. Depending on getResponse to be reliable enough could be a big problem.

The best implementation is probably going to be a text input that's hidden (can't be hidden type as our validation ignores them by default). Then a callback that's set when the captcha is rendered. The callback would then set the value of the text input if the captcha callback response is valid. This will allow normal jQuery Validate behavior without needing a custom validation rule and the captcha doesn't even need to know if jQuery Validate is being used as in that case it just doesn't do anything.

This wasn't an option at the time of implementation due to time constraints and it's still not an option due to time constraints. It will have to wait for after GJ rewrite. I've added a feature ticket to implement in a future release.

forge.joomlapolis.com/issues/5459


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 2 months ago by krileon.
The following user(s) said Thank You: nant, ahunt

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum