I have added a new dependency "CaptchaSettings" to CommonController and in ContactUs.cshtml I've added the following:
@if (Model.DisplayCaptcha)
{
<tr class="row">
<td class="item-name">
</td>
<td class="item-value">
@Html.Raw(Html.GenerateCaptcha())
</td>
</tr>
}
The recaptcha widget appears, however, when I hit the "Submit" button, even if I haven't entered the recaptcha details correctly it still allows me to submit.
How do I link recaptcha to the Contactus form such that it stops the user from doing a submit (like in Register.cshtml)?