hackergen
Forum Replies Created
-
Forum: Plugins
In reply to: [G-Forms hCaptcha] hCaptcha always fail on multi-page form submitHello,
Yes it calls the hook “validation” two times: first time when I fill the Captcha and go to the next page, and second time when I submit the entire form at the last page.
There aren’t two forms on the same page, nor any other Captcha on the page. I don’t use any specific settings for the field, I leave it as default:
– Field Label: “CAPTCHA”
– Description: (nothing)
– Choose theme: Light
– Choose size: Standard
– Custom CSS Class: (nothing)
– Admin Field Label: (nothing)
– Overwriting site key: (nothing)
– Choose mode: Visible
– reCAPTCHA compatibility: (nothing)I checked the code of the “reCAPTCHA” field of Gravity Forms, and indeed it looks like there are two verifications to avoid problems on multi-pages forms. Here is the comments on the 85th line and on the 153~155th lines of the “gravityforms/includes/fields/class-gf-field-captcha.php” file:
* This method always gets called on the last page of a form, as well as on the page where the field is assigned. [...] * In our application flow, we create a decoded string out of the reCAPTCHA service response if the reCAPTCHA field * is added to the form on a page other than the last page. We therefore first attempt to validate the decoded response, * falling back to validating the reCAPTCHA with a request to Google.
Thank you for answering me.
Best regards,- This reply was modified 2 years, 8 months ago by hackergen.