Skip to content

Instantly share code, notes, and snippets.

@amirkhan81
Created September 26, 2018 16:37
Show Gist options
  • Save amirkhan81/ea1abb206ea361edbf6a4a1fc081ea63 to your computer and use it in GitHub Desktop.
Save amirkhan81/ea1abb206ea361edbf6a4a1fc081ea63 to your computer and use it in GitHub Desktop.
https://issues.umbraco.org/issue/CON-941
Add using Umbraco.Forms.Core.Attributes; to the App_Code/ReCaptcha2.cs
Upgrade your RecaptchaPublicKey and RecaptchaPrivateKey values in UmbracoForms.config to the values provided by https://www.google.com/recaptcha/ AND make sure you add your domain! It's confusing because they give you the API keys before you actually register domains...
App_Code/ReCaptcha2.cs: Change line 77 to: var error = field.Settings.ContainsKey("ErrorMessage") ? field.Settings["ErrorMessage"] : string.Empty;
Change App_Plugins/UmbracoForms/Backoffice/Common/FieldTypes/Recaptcha2.html view was still referencing the old recaptcha image path, instead of /App_Plugins/UmbracoForms/Images/recaptcha2.png
Download: https://issues.umbraco.org/_persistent/CON-941/ReCaptcha2.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment