I have this text field where I want people register their product serial number. I have noticed a lot of my customers are entering blank spaces between the numbers. I would like to have this specific input field to not accept the empty space characters on it.
Thanks a regards,
You'll need to use jQuery. Google "jquery eliminate white space" or something similar. You'll see something like the following:
$(document).ready(function() {
$("#your-text-field").on("input", function() {
$(this).val($(this).val().replace(/\s/g, ''));
});
});
Alternatively you could let them type in spaces and remove them when the entry is submitted by using the frm_after_entry_create hook.
Please login or Register to submit your answer