Adding Google ReCaptcha to OctoberCMS Contact Us Plugin

Looking for a way to add ReCaptcha to Devinx Contact Us plugin for OctoberCMS?

When building your form, you will need to add

{% if contactForm.enableCaptcha %}
    <div class="g-recaptcha" data-sitekey="{{ contactForm.siteKey }}"></div>
{% endif %}

If you notice {% if contactForm.enableCaptcha %} where the plugin alias is contactForm.

After this you will need to enable it in your contact form settings. Settigns > Contact Us Settings > Enable captcha and enter your Google API V2 settigns here.