| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Force Capital letters in Postal Code Field | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Force Capital letters in Postal Code Field
Is there a way to force letter characters entered into the postal code field to be capitalised upon form submission?
Ideally I would like to have the form make the correction rather than force the user to re-type the Postal Code. Canadian and UK Postal Codes use Letter & Number combinations. It's a pet peeve of mine having to manually go through all of the new user sign ups and fix the postal codes. It was doable with 3 or 4 sign ups a day, but now that I am taking in 12+ a day, it really sucks having to waste the time on this. Suggestions? |
|||||||||
#2
|
|||||||||
|
|||||||||
I know you can force the output by adding
|upper after the var name in the templates http://smarty.php.net/manual/en/language.modifier.upper.php
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#3
|
|||||||||
|
|||||||||
Testing. Thanks.
|
|||||||||
#4
|
|||||||||
|
|||||||||
Ok that was not what I was looking for.
I found this snippet on the web Code:
But I don't know where to use it in register.tpl. I also found this and was wondering if anyone could help me twist this example to work somehow. Code:
The thing is, I am an idiot when it comes to Javascript. I don't even know where to start or basic rules of syntax. Puleeze help the Boss free his time. |
|||||||||
#5
|
|||||||
|
|||||||
You could modify the text box using CSS to display capital letters..
try.. font-variant: small-caps or text-transform: capitalize |
|||||||
#6
|
|||||||||
|
|||||||||
Thanks for the response (I didn't think anyone cared about this).
I am looking to force the text input for the billing postal code and shipping postal code into the database as Caps. So either it gets corrected on screen before submission or corrected during the submission process. Frankly I don't care, but business keeps snowballing and I really don't have the time to correct little things like this. Plus this would be nice to have on the board for future needs. Anyone? I'm sure one of my javascript examples will work, I just don't know how to implement it. |
|||||||||
#7
|
|||||||||
|
|||||||||
Here you go,
clever little trick that. I did this for V3.5.3 but youll see the idea of how it works for any other version. This is the code for the zip code part of the registration form Code:
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#8
|
|||||||||
|
|||||||||
Be sure to update the shipping zip code area of register.tpl as well. That way manual shipping addresses gets updated too!
Thanks Shan. Works like a charm. I can't seem to find a donate link for you. Anyway, you will want to add this to the Custom Mods Forum I would hope. |
|||||||||
#9
|
|||||||
|
|||||||
Nice one Shan, handy.
|
|||||||
#10
|
|||||||||
|
|||||||||
Quote:
glad to help http://forum.x-cart.com/viewtopic.php?t=879
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
|
|||
X-Cart forums © 2001-2020
|