ReCAptcha widget/badge NOT seen on forms. Error - Invalid reCAPTCHA value." Please try again.

Vote:
 

Hi All,
I am using default forms ReCaptch via the Forms Samples package. I have configured the Recaptcha with a valid site key and secret. I don't see any Recaptcha badge on the page. I don't see any errors on the browser console; however, on submit, I am getting the message "Invalid reCAPTCHA value." Please try again. I can see successful forms submission in the console with 200 OK responses. 

What am I missing here? Any leads appreciated 

#331170
Oct 09, 2024 10:36
Vote:
 

There could be various reasons for this issue:

Possible cause 1: reCAPTCHA file did not load

Find `recaptcha__` file in the network logs in your browser's Developer tools.

If it's missing, possibly it's blocked by the network or there are JS errors.

Possible cause 2: Form dependency scripts not working

You can verify this issue by testing the conditional or dependencies setting in form elements, e.g. Show or Hide fields based on another input.

If this feature works, the dependency scripts are okay. 

We had encountered this issue before when we found that one of embedded prerequisite JS in the Forms nuget package had inline comments, e.g. //.

Since we use a generated form for display, those inline comments caused the entire form dependency logic to be commented out.

--

#332969
Nov 15, 2024 6:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.