+ Start a Discussion
shephalishephali 

How to add Captcha in Web-to-case form

Hi all,

    I have simple web-to-case html form their i need to add Captcha/Recaptcha into it. So how can i do the same please help.

Thanks
Shephali
vishnu Rvishnu R
hi shephali,

check this out..

https://developer.salesforce.com/page/Adding_CAPTCHA_to_Force.com_Sites

hope this helps you

thanks
vishnu Rvishnu R
shephalishephali
Hi Vishnu,
   First link is regarding visualforce page and second one is for web-to-lead form i need it for web-to-case html form

Thanks
 
Tamil arasiTamil arasi
Visualforce Page:
<script src='https://www.google.com/recaptcha/api.js'>
 </script>
 <div class="g-recaptcha slds-p-horizontal_medium "   data-sitekey="enter your registered site key">
</div>
Apex Class:
String reCAPTCHAStatus = ApexPages.CurrentPage().getParameters().get('g-recaptcha-response');
if(String.isBlank(reCAPTCHAStatus))
{
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please enter ReCaptcha'));
return null;
}
Check this out!