¿How can I hide the first 12 numbers of 16 from an input for a credit card?

Alejandro C. shared this question 18 days ago
Answered

I am using the Iphone X device.

Best Answer
photo

Using an Input Text Field with a 'number' type, you can hide what's typed into a field. The attached example has two ways of doing this:

1. "On Key Up" - when you type in 12 characters that are hidden, you then focus in on another Input Text Field that has unhidden characters

2. "On Focus Out" - after typing in 16 characters, click out of the Input Text Field and the first 12 characters will be replaced with stars, and the last 4 characters will be added on the end.

Comments (1)

photo
2

Using an Input Text Field with a 'number' type, you can hide what's typed into a field. The attached example has two ways of doing this:

1. "On Key Up" - when you type in 12 characters that are hidden, you then focus in on another Input Text Field that has unhidden characters

2. "On Focus Out" - after typing in 16 characters, click out of the Input Text Field and the first 12 characters will be replaced with stars, and the last 4 characters will be added on the end.