Magento Asked on November 23, 2021
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>
Answered by Aamir on November 23, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP