Looking for a little input. I am using an address block in Forms and I want to not only set the limit of the Zip Code to 5 but I want to limit the input to digits.
I can set the max length to 5 characters with $(".Postal").attr("maxlength", 5); in the JavaScript.
I can limit it to numbers using $(".Postal").attr({"type", "number"); BUT that puts up and down arrows at the end of the field input and I don't like that.
I have been playing around with $(".Postal").attr("pattern", "\d{5})"); and multiple variations such as [0-9] but [0-9] always tells me it is invalid input no matter what I put in the field. And other variations I have tried always break the rest of the javascript for the state and county fields.
Does anyone out there have a simple way to limit the Zip in an address block to 5 digits?
Thanks.