diff --git a/Views/Partials/Forms/Fieldtypes/Fieldtype.hCaptcha.cshtml b/Views/Partials/Forms/Fieldtypes/Fieldtype.hCaptcha.cshtml new file mode 100644 index 0000000..45c262a --- /dev/null +++ b/Views/Partials/Forms/Fieldtypes/Fieldtype.hCaptcha.cshtml @@ -0,0 +1,27 @@ +@using UmbracoForms.HCaptcha +@model Umbraco.Forms.Mvc.Models.FieldViewModel +@{ + var siteKey = AppSettingsManager.GethCaptchaSiteKey(); + var theme = "light"; + var themeSetting = Model.AdditionalSettings.FirstOrDefault(x => x.Key == "Theme"); + if (themeSetting.Value != "") + { + theme = themeSetting.Value; + } + var size = "normal"; + var sizeSetting = Model.AdditionalSettings.FirstOrDefault(x => x.Key == "Size"); + if (sizeSetting.Value != "") + { + size = sizeSetting.Value; + } + + if (!string.IsNullOrEmpty(siteKey)) + { + +
+ } + else + { +ERROR: hCaptcha is missing the Site Key - Please update the web.config to include 'key="hCaptchaSiteKey"'
+ } +} \ No newline at end of file