I am getting captcha at contact us page. But when same file is called in static block, contact us form works fine but captcha does not occur.
Kindly suggest any solution.
I am getting captcha at contact us page. But when same file is called in static block, contact us form works fine but captcha does not occur.
Kindly suggest any solution.
I think that you have the js issue,
in app/design/frontend/{package}/{theme}/template/contacts/form.phtml
replace
<script type="text/javascript">
//<![CDATA[
var contactForm = new VarienForm('contactForm', true);
//]]>
</script>
With:
<script type="text/javascript">
//<![CDATA[
var contactForm = new VarienForm('contactForm', true);
function validateCaptcha() {
var v = grecaptcha.getResponse();
if(v.length == 0) {
jQuery('#error-g-captcha').show();
return false;
}else {
jQuery('#error-g-captcha').hide();
return true;
}
}
//]]>
</script>