+ Reply to Thread
Results 1 to 6 of 6

Thread: How to change phone number format?

  1. #1

    How to change phone number format?

    Hi Flynax,

    So in my country phone number is not show as (xxx) xxx-xxxx
    But it is 0x-xxxx-xxxx
    Starting with 0 and usually people will input 02 or 06

    Can I change format by editing field_out_value.tpl?
    I have been researching whole morning with no success

  2. #2
    Hello Wei Hong,

    Phone view you can change in file: ftp://includes>>classes>>reefless.class.php in method: parsePhone
    Viktor,
    Flynax technical department,
    Best wishes.

  3. #3
    Please check my attached screenshot.

    and in method: parsePhone find code:

    PHP Code:
    Only registered members can view the code
    and replace to:
    PHP Code:
    Only registered members can view the code
    I hope it will help you.
    Attached Images Attached Images
    Last edited by Viktor; April 30, 2018 at 04:50 AM.
    Viktor,
    Flynax technical department,
    Best wishes.

  4. #4
    thank you very much Viktor,

    What if I want to leave the phone format at default, but only want to change number type listing field key: 'v_phone' to show as xx-xxxx-xxxx, the input in add listing page could be the same, no need for changing, like user can input 0123456789 in add listing page. Then in listing detail page it show 01-2345-6789

  5. #5
    Did you use my code and checked my attached screesnhot?
    Viktor,
    Flynax technical department,
    Best wishes.

  6. #6
    Quote Originally Posted by Viktor View Post
    Did you use my code and checked my attached screesnhot?
    Yes Viktor,

    But I want to leave phone number format unchanged. I only need to change format of a 'number type' field in listing detail page.

    When user input in number type listing field (key: v_phone) like this: 0123456789
    In listing detail page it shows: 01-2345-6789

    It is possible to do so.

+ Reply to Thread