I use the below code in a CMS block to show the default magento contact us form.


Just wondering will there be a core way to enable captcha in the form?


2 Answers 2


In order to add CAPTHA to a Contact Us form you have to go to Stores -> Configuration -> Customers -> Customers Configuration page and Enable CAPTCHA. Make sure to select Contact Us value in Forms field.

enter image description here

Once you update configuration, clean cache.

Hope it helps.

  • I believe the design Tab is only for page and not for the block. Also the question I asked is how to show Captcha on the contact Us form which I dont believe you answer addresses that... Jan 16, 2016 at 17:33
  • @Malaiselvan i completely missed the whole point of the question. It was long day yesterday. Let me write you an answer.
    – Max Pronko
    Jan 16, 2016 at 18:46
  • Thanks. You are correct. However I realized that I do not need to create a block or a page for contact us. All I need to do is enable Contact Us from Configuration and enable Catpcha for Contact Us. Jan 17, 2016 at 14:25
  • 3
    Suppose i have created Custom Form & i want to add that in "Forms" list then how can i manage this?. So on my custom form also captcha will display
    – Jackson
    Aug 30, 2016 at 4:20
  • I want to use default captcha in newsletter form. so which kind of changes i shall make ? Aug 27, 2018 at 4:54

You can make a custom form template (based on the original) then you can load reCaptcha block programmatically whith this :

    echo $block->getLayout()
            ['data' => 
                    'jsLayout' => 
                        'components' => 
                            'msp-recaptcha' => 
                                'component' => 'MSP_ReCaptcha/js/reCaptcha',
                                'zone' => 'contact'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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