Alter "Postal Code/ZIP" length restrictions in Contacts

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
Gavin101
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri May 25, 2007 6:47 am

Alter "Postal Code/ZIP" length restrictions in Contacts

Post by Gavin101 » Sun Feb 17, 2008 10:23 pm

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.

radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

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

Post by radiant_tech » Mon Feb 18, 2008 10:50 am

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.
Denise

Gavin101
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri May 25, 2007 6:47 am

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

Post by Gavin101 » Wed Feb 20, 2008 3:49 am

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.

radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

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

Post by radiant_tech » Wed Feb 20, 2008 3:56 pm

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,
Denise


Post Reply