Skip to content

Instantly share code, notes, and snippets.

@pmgllc
Created January 10, 2014 15:48
Show Gist options
  • Save pmgllc/8356791 to your computer and use it in GitHub Desktop.
Save pmgllc/8356791 to your computer and use it in GitHub Desktop.
It likes this one.
<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery('#Submit').click(function() {
var splitName = jQuery('#Contact0FirstName').val();
var names = splitName.split(' ');
var firstName = names.splice(0,1);
var lastName = names.join(' ');
jQuery('#Contact0FirstName').val(firstName);
jQuery('#Contact0LastName').val(lastName);
jQuery('form').submit();
return true;
});
});
</script>
@pmgllc
Copy link
Author

pmgllc commented Jan 10, 2014

Thanks. Giving it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment