5 added 133 characters in body
source | link

This script use for validation google reCaptcha like a default validation of magento. please use it.

<form name="freeeventForm" id="freeeventForm">
    <div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
</form>
        <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
    <script type="text/javascript">
        //< ![CDATA[
            var CaptchaCallback = function() {  
            grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
        };
        var customForm = new VarienForm('freeeventForm');
        Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
            var response = grecaptcha.getResponse();
            if (response.length === 0) {
                    return false;
            }
            return true;
    });
        //]]>
    </script>

This script use for validation google reCaptcha like a default validation of magento. please use it.

<div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
        grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
    };
    var customForm = new VarienForm('freeeventForm');
    Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
        var response = grecaptcha.getResponse();
        if (response.length === 0) {
                return false;
        }
        return true;
});
    //]]>
</script>

This script use for validation google reCaptcha like a default validation of magento. please use it.

<form name="freeeventForm" id="freeeventForm">
    <div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
</form>
        <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
    <script type="text/javascript">
        //< ![CDATA[
            var CaptchaCallback = function() {  
            grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
        };
        var customForm = new VarienForm('freeeventForm');
        Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
            var response = grecaptcha.getResponse();
            if (response.length === 0) {
                    return false;
            }
            return true;
    });
        //]]>
    </script>
4 added 17 characters in body
source | link

This script use for validation google reCaptcha like a default validation of magento. please use it.

<div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
        grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
    };
    var customForm = new VarienForm('freeeventForm');
    Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
        var response = grecaptcha.getResponse();
        if (response.length === 0) {
                return false;
        }
        return true;
});
    //]]>
</script>

This script use for validation like a default validation of magento. please use it.

<div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
        grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
    };
    var customForm = new VarienForm('freeeventForm');
    Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
        var response = grecaptcha.getResponse();
        if (response.length === 0) {
                return false;
        }
        return true;
});
    //]]>
</script>

This script use for validation google reCaptcha like a default validation of magento. please use it.

<div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
        grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
    };
    var customForm = new VarienForm('freeeventForm');
    Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
        var response = grecaptcha.getResponse();
        if (response.length === 0) {
                return false;
        }
        return true;
});
    //]]>
</script>
3 deleted 29 characters in body
source | link

This script use for validation like a default validation of magento. please use it.

<div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
            grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALBytxxxxxxxxxxxxxxxxxxxx''6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
        };
        var customForm = new VarienForm('freeeventForm');
        Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
            var response = grecaptcha.getResponse();
            if (response.length === 0) {
                    return false;                       
            }
            return true;
    });
    //]]>
</script>

Here created magento custom validation validate-reCAPTCHA. this validation method working same as default.

<div id="RecaptchaField"></div>
<input type="hidden" class="validate-reCAPTCHA">
<script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
            grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALBytxxxxxxxxxxxxxxxxxxxx'});
        };
        var customForm = new VarienForm('freeeventForm');
        Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
            var response = grecaptcha.getResponse();
            if (response.length === 0) {
                    return false;                       
            }
            return true;
    });
    //]]>
</script>

Here created magento custom validation validate-reCAPTCHA. this validation method working same as default.

This script use for validation like a default validation of magento. please use it.

<div id="RecaptchaField"></div>
    <input type="hidden" class="validate-reCAPTCHA">
    <script src="https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit" async defer></script>
<script type="text/javascript">
    //< ![CDATA[
        var CaptchaCallback = function() {  
        grecaptcha.render('RecaptchaField', {'sitekey' : '6LeuiDwUAAAAALByt-xxxxxxxxxxx-xUsZHFkeEP'});
    };
    var customForm = new VarienForm('freeeventForm');
    Validation.add('validate-reCAPTCHA','reCAPTCHA is mandatory',function(){
        var response = grecaptcha.getResponse();
        if (response.length === 0) {
                return false;
        }
        return true;
});
    //]]>
</script>
2 edited body
source | link
1
source | link