View Full Version : Listing Field phone number length
Thomas Yuan
January 12, 2014, 02:27 AM
Hi there,
I there any way to change the phone number length from maximum length of 9 to 10?
Cheers,
Thomas
Mike
January 17, 2014, 06:30 AM
you have to do one small change to be able to enter length more than 9.
Open admin/tpl/block/fields/add_edit_form.tpl file and find code ~335 line
<tr>
<td class="name">{$lang.field_format}</td>
<td class="field_tall">
<ul class="clear_list">
<li><label><input type="checkbox" name="phone[code]" {if $phone.code}checked="checked"{/if} value="1" /> {$lang.phone_code}</label></li>
<li id="phone_block" {if $phone.condition}class="hide"{/if}><input style="width: 20px;text-align: center;" type="text" name="phone[area_length]" value="{if $phone.area_length}{$phone.area_length}{else}3{/if}" maxlength="1" /> <label>{$lang.phone_area_length}</label></li>
<!-- you have to change this line--><li><input style="width: 20px;text-align: center;" type="text" name="phone[phone_length]" value="{if $phone.phone_length}{$phone.phone_length}{else}7{/if}" maxlength="1" /> <label>{$lang.phone_number_length}</label></li>
<li><label><input type="checkbox" name="phone[ext]" {if $phone.ext}checked="checked"{/if} value="1" /> {$lang.phone_ext}</label></li>
</ul>
</td>
</tr>
and change maxlength="1" to maxlength="2"
Thomas Yuan
January 17, 2014, 09:48 AM
Works perfect,
much thanks Mike :D
Anderson Camargo
August 31, 2017, 07:28 PM
thanks for sharing
Powered by vBulletin® Version 4.1.9 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.