16
Views
5
Comments
InputMaskMobile Decimal Field
Question
Application Type
Mobile

Dears,

I am developing a mobile app distributed as PWA, and I need fill a decimal field. I am using the forge component Input Mask Mobile. I would like define a mask where the integer part could be variable. For example be possible digit 35,20 or 1234,32. I only get a fixed integer, for example with mask "0000,00". Then to digit 35,20 I must enter 0035,20. There is some mask element to solve this?

Best Regards,

Roberto 

2024-12-02 13-16-47
Vipin Yadav

Hi Easy Batch,

I have added oml for your reference please check.


Thanks,

Vipin Yadav

AmountsMasking.oml
2022-08-31 18-26-36
Easy Batch

Hi Vipin,

I appreciate your help, but I not have success. Because the Intelectual Property, I copied carefully your oml element to my test. But it not worked. The fields have a behavior of text field, accepting letters and numbers.

Best regards,

Roberto

2024-12-02 13-16-47
Vipin Yadav

Hi Easy Batch, 

can you please share your oml.

Thanks,

Vipin Yadav

2022-08-31 18-26-36
Easy Batch

Hi Vipin,

Attached the oml. It is the same InputMaskMobileDemo from forge component. The first field has the mask "0000,00". It works, but  I'm was obliged to digit 4 integers numbers always. 

I have an app in traditional web, where I use a forge component (don't exists today) called InputMask. That, the field is filled from rigth to left. Then I get write the number of integers that I wish, and the decimal part always stay with the number defined in the mask. It's good.

Thank you very much,

Roberto

InputMaskMobileDemo.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Roberto,

I observed that the InputMaskMobile forge asset does have a limited configuration option available for the NumberMask block. 

For your requirement, you can define your custom block by referring to the imask library.

Refer to the imask documentation: masked-number

See this demo: NumberInputMask

Refer to the attached oml.

I hope this helps you!


Kind regards,

Benjith Sam

Mob_NumberInputMask.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.