chexton
5/13/2013 - 1:10 PM

listens-to-field.js

listens-to-field.js

$("#ID_of_element").blur(function() { // Replace with the ID of the HTML input element where they enter their email
    var input = $(this); 
    var email = input.val();
    var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
   
    if(regex.test(email)) {
      _veroq.push(['user', {
        id: email,
        email: email
      }]);
    }
});