Input text field mask/format

Tiago shared this question 9 months ago
Answered

I'd like to know if is possible to change the format/mask from an input data field.For instance, if I type 000011 the field automatically show me 000.00-11.

Comments (6)

photo
2

Sure - using the Substring and Concat functions. Check out the attached prototype to see an example.

photo
1

Perfect! Thank you for your help!Also, is possible do the same but while the user is typing?

photo
2

Yes, but you'll need to change the events a little. In the attached prototype, instead of using Substring, we use a condition to detect when the number of characters is a certain amount, and then Concatenate . and -.

photo
1

Got it... instead of verifying the number of char, I need to setup it to verify each key pressed, for example...

photo
1

What do you mean by verify? If the key has a specific value, for example?

photo
1

By verifying I meant to check the data from the field. Instead, check the data only in the end, it could check the data each time I press any key while typing the number.

photo