I see this question has been asked before, but no one has yet answered it that I see.
I have 2 almost identical forms, 1. in a lighbox, and 2. not in a lighbox
I have validation going on that works perfectly well in the 2nd scenario, but not the first:
the lightbox version is giving a console error: Uncaught ReferenceError: lp is not defined
any ideas?
<script>
lp.jQuery('#full_name').blur(function() {
var check_name_b = lp.jQuery(this).val().trim().split(" ");
if(check_name_b.length > 1){
lp.jQuery(this).css("border-color", "#000000");
lp.jQuery("#lp-pom-button-3").addClass( "enabled" );
}
if(check_name_b.length < 2){
lp.jQuery(this).css("border-color", "red");
lp.jQuery("#lp-pom-button-3").removeClass( "enabled" );
window.alert("Oops, please include:\nFirst Name & Last Name");
}
});
</script>