View Full Version : Phone Number fields
Lehii3@yandex.ru
February 12, 2024, 03:09 PM
Hello. Please tell me how to make the number look like +7 (XXX)XXX-XX-XX So that Instead of the default country code it was +7, and then (XXX)XXX-XX-XX
Rudi
February 12, 2024, 06:39 PM
Hello,
See these threads:
https://forum.flynax.com/showthread.php?5099-Telefon-Number-format&highlight=phone+format
https://forum.flynax.com/showthread.php?5099-Telefon-Number-format&highlight=phone+format
It should help
Lehii3@yandex.ru
February 13, 2024, 02:40 PM
It doesn't work. I need to remove the field with the country code so that it is written +7 before the remaining two fields and then just enter the number
Lehii3@yandex.ru
February 13, 2024, 02:43 PM
Leave two fields with the number. They're working fine. And I don't need the country code. You need +7 to be the default
Rudi
February 13, 2024, 02:55 PM
You can set the default code number via /templates/your_template/tpl/blocks/reg_account.tpl > find the line {elseif $field.Type == 'phone'}
below replace:
{if $field.Opt1}
+ <input type="text" name="account[{$field.Key}][code]" {if $fVal.$fKey.code}value="{$fVal.$fKey.code}"{/if} maxlength="4" size="3" class="wauto ta-center numeric" /> -
{/if}
with:
{if $field.Opt1}
+ <input type="text" name="account[{$field.Key}][code]" value="{if $fVal.$fKey.code}{$fVal.$fKey.code}{else}7{/if}" maxlength="1" size="1" class="wauto ta-center numeric" /> -
{/if}
Powered by vBulletin® Version 4.1.9 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.