Page 1 of 1

Alter "Postal Code/ZIP" length restrictions in Contacts

Posted: Sun Feb 17, 2008 10:23 pm
by Gavin101
Hi,

I would like to be able to alter the current number of characters I can insert into the "Postal Code / Zip" section of my Contacts page.

Currently, it appears to be limited to 10 characters. I would like to increase this to 15 characters.

I anticipate it involves a simple alteration of the Contact PHP Script contained in the com_contact Folder but I can't figure out exactly what I have to alter.

I really appreciate your help. Many thanks,

G.

Re: Alter "Postal Code/ZIP" length restrictions in Contacts

Posted: Mon Feb 18, 2008 10:50 am
by radiant_tech
Unless we are looking at different pages, I don't see such a small limitation on the Contacts input form. (Although my experience with J! is 1.5 only.) In 1.5, the field on the input form is 60 chars up to a maximum of 100, and the database field will hold a maximum of 100 chars.

Re: Alter "Postal Code/ZIP" length restrictions in Contacts

Posted: Wed Feb 20, 2008 3:49 am
by Gavin101
Yes, I am using an earlier version and there is a limitation. If anyone knows which element of code I can change I would be grateful.

Re: Alter "Postal Code/ZIP" length restrictions in Contacts

Posted: Wed Feb 20, 2008 3:56 pm
by radiant_tech
Sorry for my confusion. You are likely looking for the file in com_contact that generates the form, and more specifically for the "postcode" input box (at least that is what it is named in 1.5).

It will look something like this:

Code: Select all

<input class="inputbox" type="text" name="postcode" id="postcode" size="60" maxlength="100" value="" />
size= refers to the size of the input box displayed on the screen
maxlength= refers to the maximum number of characters that can be added (and should be the same as the max characters in the database field

Hope that helps,