View Single Post
  #2  
Old 01-20-2022, 12:23 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: limit the number of characters allowed on address line 1

/skin/common_files/modules/One_Page_Checkout/profile/address_fields.tpl
Around line 72...
Replace...
Code:
<input type="text" id="{$id_prefix}{$fname}" name="{$name_prefix}[{$fname}]" size="32" maxlength="255" value="{$address.$fname|default:$default_value|escape}" {$autofocus} />

With...
Code:
<input type="text" id="{$id_prefix}{$fname}" name="{$name_prefix}[{$fname}]" size="32" maxlength="{if $fname eq 'address'}32{else}255{/if}" value="{$address.$fname|default:$default_value|escape}" {$autofocus} />
That will set the maximum length of address line 1 to 32 characters.

Or you could just change 255 to 32 to limit all fields maximum lengths to 32 characters.
__________________
xcartmods.co.uk
Reply With Quote