quickform icon indicating copy to clipboard operation
quickform copied to clipboard

Add input masks

Open ddjerqq opened this issue 1 year ago • 3 comments

wiki

"e.g. When entering into a text box a phone number on a data capture form, in the format "(111) 111 1111" the area code brackets, the space between the number and the area code will automatically be placed in."

ddjerqq avatar Mar 06 '24 14:03 ddjerqq

https://stackoverflow.com/a/55010378/14860947

ddjerqq avatar Mar 06 '24 18:03 ddjerqq

Most input masks for forms leverage jQuery. Some are better than others. It has been a while since I last used them in a project so I am not going to point to any references, but YMMV.

I would honestly recommend trying to build this in without jQuery, using a base library written in standard JS for functionality and then letting others create their own input masks for their own needs. This will likely help avoid a dependency on jQuery, which can be quite a moving target. You can always include the usual suspects for convenience’s sake (phone, postal code, etc.), but most input mask libraries allow you to custom-create new masks on your own anyhow.

rekabis avatar Mar 06 '24 22:03 rekabis

https://mudblazor.com/features/masking#patternmask

ddjerqq avatar Apr 22 '24 23:04 ddjerqq