adrianmak Posted March 8, 2018 Share Posted March 8, 2018 as title. 1 Link to comment Share on other sites More sharing options...
teppo Posted March 8, 2018 Share 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 Link to comment Share on other sites More sharing options...
tpr Posted March 8, 2018 Share 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 Link to comment Share on other sites More sharing options...
LostKobrakai Posted March 8, 2018 Share Posted March 8, 2018 This seems to be a quite good lib: https://nosir.github.io/cleave.js/ 2 Link to comment Share on other sites More sharing options...
tpr Posted March 8, 2018 Share 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 Link to comment Share on other sites More sharing options...
Macrura Posted March 9, 2018 Share 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.. Link to comment Share on other sites More sharing options...
tpr Posted March 9, 2018 Share Posted March 9, 2018 Let's continue discussion on Input mask in AOS here. Link to comment Share on other sites More sharing options...
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