Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Credit Card input mask for a text field

Status
Not open for further replies.

nickspace

IS-IT--Management
May 2, 2005
43
US
Hi folks,
I need to have users enter credit card numbers in a text field but only the last four digits should show.... the rest should be masked by "*". Can this be done easily?

Also, can we also apply this mask to the table column where this info is stored?

Thanks in advance for all the help.
 
Can this be done easily?

Not in a single field. If you set the Input Mask property to Password then the whole field shows as "*********". Store the number in two fields, display the first with a Password style Input Mask and display the final four digits as plain text. This works in the table view as well as in a form.

I don't know what country and what legal system you're in but in the UK you ought to be encrypting credit card numbers before storing them. Even with the Password style the numbers are still easily available to anyone who can open Excel and select "Data" then "Get External Data" from the menu. And anybody who takes a copy of your data can just remove the Input Mask.

Geoff Franklin
 
How are ya nickspace . . . . .

Not much can be added to [blue]alvechurchdata's[/blue] post, but be aware . . . . credit card numbers have [blue]different lengths & grouping of numbers.[/blue] This dictates you'll more than likely windup with [purple]a table of Input Masks.[/purple]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top