Get a Jumpstart with our Sample Apps
Results 1 to 3 of 3

Thread: Format phone number with keypad editor

  1. #1
    Member MichaelCarroll's Avatar
    Real Name
    Michael Carroll
    Join Date
    Feb 2008
    Posts
    458

    Default Format phone number with keypad editor

    What is the easiest way to format a phone number when using the keypad editor? Not in the form view, but in the keyboard entry field itself.

    So when I am typing into the keypad editor it is filling out the phone number formatted...

    (23_) ___ - ____
    (232) 31_ - ____
    (232) 313 - 8___
    (232) 313 - 811_
    (232) 313 - 8112

    Seems like something so simple to do, but I am missing something.

    Michael Carroll

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,192

    Default Re: Format phone number with keypad editor

    For your FormView phone number field...

    FormView, Fields, Editor configuration genie, Custom formatting Javascript…

    Code:
    return Number(val).toFormat('(###) ###-####');

    FormView, Fields, Display format...

    Code:
    =(###) ###-####
    The KeyPad Editor function getDisplayValue grabs the "formatter", as defined above, and applies it to the data.
    Last edited by Davidk; 08-16-2017 at 01:31 PM.

  3. #3
    Member MichaelCarroll's Avatar
    Real Name
    Michael Carroll
    Join Date
    Feb 2008
    Posts
    458

    Default Re: Format phone number with keypad editor

    Quote Originally Posted by MichaelCarroll View Post
    What is the easiest way to format a phone number when using the keypad editor? Not in the form view, but in the keypad entry field itself.
    When I was just editing this in Work Preview -- it did not format and would just display numbers with no mask or formatting. So I was thinking there was something that needed to be done inside of the the keypad editor. However when I opened it in an external browser it worked. Simple and sweet.

    David you answered my question and I am learning more about how the editors are working. Thank you.
    Last edited by MichaelCarroll; 08-19-2017 at 04:08 AM.

Similar Threads

  1. How to format a phone number in formview?
    By Td203 in forum Tablet-Optimized Form Capabilities Beta
    Replies: 1
    Last Post: 11-10-2015, 04:45 PM
  2. Format phone number
    By aschone in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 04-02-2015, 04:14 PM
  3. Javascript to Format Phone Number
    By Steve Workings in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 05-04-2009, 06:34 PM
  4. fixing format of Phone number field
    By barry685 in forum Alpha Five Version 9 - Desktop Applications
    Replies: 3
    Last Post: 03-26-2009, 05:12 PM
  5. Format Input box for Phone number
    By crimmelcp in forum Web Application Server v7
    Replies: 4
    Last Post: 05-15-2006, 04:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •