teppo Posted March 8, 2018 Posted March 8, 2018 I might be in the minority here, but at first I had absolutely no idea what an "input mask" is. This cleared things up nicely: https://css-tricks.com/input-masking/. Seems like a nice addition – either for the core, or as a third party module. 1
tpr Posted March 8, 2018 Posted March 8, 2018 If it's JS only then I could try adding it to AdminOnSteroids, even though in the past years I haven't felt the need for such feature. What makes it harder that multi-language needs to be taken into account, eg. you may need different mask per language. 1
LostKobrakai Posted March 8, 2018 Posted March 8, 2018 This seems to be a quite good lib: https://nosir.github.io/cleave.js/ 2
tpr Posted March 8, 2018 Posted March 8, 2018 Cleave looks nice, thanks. I managed to set up a working PoC, the only issue came up was submitting the value - the formatted value got saved so I had to remove fomatting on submit to save the raw value. You can see the raw value (no delimiters) for a second before submit and Tracy Console also shows the right value. The configuration looks like this: 2
Macrura Posted March 9, 2018 Posted March 9, 2018 Do love me some input masks – one benefit could be using less fields, e.g. not needing a separate area code field for a phone, or enforcing consistency in places..
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now