Help with zip code field?
i've got everything working great in my form. Was getting close to unveiling it to my customer and I realized that the form is stripping "0" (zeros) off the first number in my zip codes. Obviously, it only applies to those zips that begin with zero, but there are plenty.
Anyone have any ideas?
Thanks,
Bob
Re: Help with zip code field?
Ran across this setting while trying to fix my own problems and I remembered seeing your question. No idea if you've checked into it already (or if it'll even work) but have you looked at the ZERO_IS_EMPTY setting in formmail? Here's the help page:
http://www.tectite.com/fmdoc/zero_is_empty.php
According to the documentation, it shouldn't be what's causing your problem, but I figured it's something you could at least try?
Re: Help with zip code field?
Thanks for your advice. Actually, I think the "0"s are removed by excel not by the form...
Re: Help with zip code field?
If you save your form to Excel .CSV then the leading zeros are stripped.
Open your excel file by right clicking with your mouse and select "open With" Then select Notepad. You will see in your notepad the leading zeros are intact.
In excel when you open this file you will need to make the zip code or in our instance the phone number a "Text Field" to keep the leading zeros intact. However when you receive the form via email you shouldn't have any problems with the leading zero.
Hope that helps.
Re: Help with zip code field?
my customer asked if I would make the zip code field a "text" field. how do I do this?
Re: Help with zip code field?
I'm a little confused, are you talking about how the customer receives the information via email? Or the CSV file left on the server?
The email should display with the Zero intact.
The CSV file will need to be opened correctly in excel to keep the leading zero. It's up to the customer to open the file from the server. Doesn't have anything to do with the script it's self. Try saving as TXT then open with the Excel Wizard.