Adding recaptcha on existing or custom page

2 months ago
Is there a markup to insert to enable recaptcha on an existing page that is not supported by default? I'm on nop 4.xxx.

Example:
<div class="captcha-box">
   <nop-captcha />
</div>

Any suggestions appreciated.
2 months ago
Did you try adding that code

<div class="captcha-box">
   <nop-captcha />
</div>

Plus
            // validate CAPTCHA
            if (_captchaSettings.Enabled && _captchaSettings.ShowOnForgotPasswordPage && !captchaValid)
            {
                ModelState.AddModelError("", _localizationService.GetResource("Common.WrongCaptchaMessage"));
            }

That is what is used for the Forgot Password Page
2 months ago
Yidna wrote:
Did you try adding that code
That is what is used for the Forgot Password Page


Thank you for the feedback. I was hoping for a simple solution without recompiling the source. Anyway, I'll modify some of the controllers that are specific to any post spam.

I hoping in the future there is an option to include a captcha or some sort of bot spam mechanism for any form that has a post. Not everyone can code or like to modify the source code.