- π¦πΉAustria maxilein
I be created a module, since I really needed that functionality for core number fields
https://www.drupal.org/project/formatted_number_input β
Custom input masks do not allow for optional characters. This is a missing feature IMHO.
Here's one use case: Currently, Number fields do not support a required number of characters after the decimal place as per #2906039: Decimal number field? β . As a result, I must make my own currency fields with a Text Field element and an input mask. There is a pre-configured "Currency" input mask that works in limited fashion. Unfortunately, if I want to remove the dollar sign from the field or use a different currency prefix, I CANNOT do it with a custom currency input mask because I only have REQUIRED characters to work with (9 = numeric; a = alphabetical; * = alphanumeric). This is a problem because the integer before the decimal can be any number of characters. For example, a mask such as 999.99 would force the user to enter 001.23, for a value of 1.23.
I propose there be OPTIONAL input mask characters. For example if 0's are optional and 9's are required, one could create a mask 009.99 to accept all digits from 0.01 to 999.99.
Closed: works as designed
5.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I be created a module, since I really needed that functionality for core number fields
https://www.drupal.org/project/formatted_number_input β