justinmind-logo
 
Upvote 2

Input text field mask/format

Answered Tiago 5 years ago

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.

Replies (1)
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
Leave a Comment
 
Attach a file