1

I've implemented a Sitecore 9 Forms Custom Submit Model referring to this article:

https://www.codinglittlethings.com/2019/10/sitecore-9-forms-google-recaptcha-field.html

The only difference is, I am using Google ReCaptcha V3 instead of V2 (as in above article)

I have placed my Custom Model above the SaveData method in the Form Action:

enter image description here

Now the issue is - when I hit the submit button, it successfully validates the Captcha and submits the form and returns true. When I press F5 (while debugging in Visual Studio), it again hits the break-point I have placed same Custom Submit Model and this time the Captcha validation fails (with duplicate error)

Please point out, what exactly is wrong.

1

When you press F5, you resubmit the request with the same data. It's logical that the captcha payload is not valid anymore on the second request.

You could add a redirect submit action to have the form redirect on submit, so that F5 won't resubmit the request.

| improve this answer | |
  • Hello Bart, I am sorry for not being clear. By F5 I meant in Visual Studio while debugging the code. And even without debugging I am unable to submit, since the method is called twice. I've edited my question. – SitecoreSXADeveloper Mar 10 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.