Print Page | Close Window

Limiting Input Field Lengths

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=701
Printed Date: 03-December-2024 at 11:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Limiting Input Field Lengths
Posted By: alldayangler
Subject: Limiting Input Field Lengths
Date Posted: 14-March-2007 at 10:18am
I need to modify PC so that there is a limit on the number of characters that can be entered into a customers name and address fields when ordering.  Currently it allows more characters than the accounting program we use allows.  How do I do this?  Your help is appreciated.



Replies:
Posted By: netprofits
Date Posted: 14-March-2007 at 11:08am

You would need to edit login.asp. There are two areas you may want to modify:
1. For PC version 3.051, lines 292-304 and 347-360 define the maximum lengths allowed for the main form fields. Just decrease the numbers at the end of each line accordingly. This will force the fields to be truncated to the length you specify but won't restrict what the customer actually enters.

2. To restrict the length of data customers can actually type, you would need to add the MAXLENGTH parameter to the corresponding form fields. These form fields start around line 1250. Here is a sample of Maxlength:

<INPUT TYPE=TEXT NAME="fieldname" MAXLENGTH=20>

This will only allow the user to type 20 characters in the field.



-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net