PDA

View Full Version : zip code in database



mwalsh62
11-10-2007, 01:25 AM
Hi all,

I just noticed that some US east coast zip codes that begin with zero, have the zero dropped in my table. Will this appear as a 4 digit number if someone retrieves info in a search? Or is the zero just not visible in MyAdmin?

navaldesign
11-10-2007, 06:56 AM
If you have set the zip code as number field, zeros at the begining are trimmed off. Set the ZIP code as text and not as number. In many countries zip contains also letters.

You need to change both the field type in your form, AND the field type in your database table.

mwalsh62
11-10-2007, 11:31 AM
Thanks Naval.

Another question: I've seen in the phone number field of forms set up where the brackets for area codes and hyphens are set as initial values, like this; (___)-___-____ , and the cursor moves as user enters the correct amount of numbers. Is this a difficult trick?

navaldesign
11-10-2007, 11:42 AM
It requires custom Javascript, so it is not an easy task.