SaaS CMS has officially launched! Learn more now.

Google recaptcha v2 giving "invalid captcha value" error on form submit



I am using Episerver.Forms.Samples reCaptcha(Google Recaptcha). In the recaptcha block I have entered my sitekey and secretKey and the necessary script code on my html file.I am successfully able to display the Recaptcha.

But after verifying the Recaptcha when I submit the formI always get an error "Invalid captcha value."

Is I am missing something? 

Many thanks in advance.

May 04, 2017 13:50

Check 1: What browser are you using, Id there any error in console? Try with different browser.

Check 2:


May 04, 2017 15:20


@K Khan.

I am using chrome browser.

I have tried in different browsers also but still getting error "Invalid captcha value."

On my console I am getting an "epi is not defined" error for forms.

May 05, 2017 6:23

Try this: 

May 06, 2017 15:00


I have already visited that link few days ago and also posted a comment there,which I am posting here again.

" I am not using @RenderSection anywhere in my project instead I have used @RenderBody() method in my layout file and have include RequiredClientresources in header and footer.

But still getting the epi is not defined error."

Are you saying that  "epi is not defined" error is the actual cause of error "Invalid captcha value." that I am getting on my console.

May 08, 2017 6:01

Hi @Aman, did you find a solution for this?  I'm having the same issue. 

Mar 04, 2021 17:10

same issue.

here's our form versions

Sep 02, 2021 14:02
Edited, Sep 02, 2021 20:12

we found that problem was not in recaptcha element but in one of the text boxes that has a condition to show/hide. There was a condition for this element but an action (show/hide) was missing leading the form to not submit.

Sep 14, 2021 6:45

Thaks for this information!

Sep 20, 2021 12:19
* 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.