Created
March 2, 2017 19:05
-
-
Save mikewing94/715a649096da1fab379f90e8f782177a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function(){ | |
jQuery('input[name=hidden_email_field]').attr('id', 'hidden_email_field'); // matches exactly 'hidden_email_field' | |
jQuery('#username, #first_name, #last_name, #company, #other_company, #password, #hidden_email_field, #lang, #language').bind('keypress blur', function() { | |
jQuery('#first_name, #last_name').keyup(function () { | |
this.value = this.value.replace(/ /g, "_"); | |
}); | |
jQuery('#user_email').val(jQuery('#first_name').val() + '' + | |
jQuery('#last_name').val() + '' + | |
jQuery('#company').val() + '' + | |
jQuery('#password').val() + '' + | |
jQuery('#hidden_email_field').val()); | |
jQuery('#user_login').val(jQuery('#first_name').val() + '_' + | |
jQuery('#last_name').val() + '' + | |
jQuery('#company').val()) + '' + | |
jQuery('#other_company').val() + '' + | |
jQuery('#password').val(); | |
jQuery('#language').val(jQuery('#lang').val()); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment