Hi everyone here is a snippet that will help you in trimming the input fields before they get validated and submitted any further.
$("#mySignupForm").submit(function() {
$(this).find('input:text').each(function(){
$(this).val($.trim($(this).val()));
});
});
- Happy Coding
$("#mySignupForm").submit(function() {
$(this).find('input:text').each(function(){
$(this).val($.trim($(this).val()));
});
});
- Happy Coding
No comments:
Post a Comment