Using mask with previous bad phone numbers?

6 posts, 0 answers
  1. Aron
    Aron avatar
    80 posts
    Member since:
    Dec 2005

    Posted 10 Aug 2009 Link to this post

    Hello,
    My client wants to use the Rad Input Mask for the phone textbox on a form on our site. This is great for new customers filling out the form. However when populating the text box with phone numbers previously entered the Rad Input Mask does not work well because the phone numbers are written with and without the () - and spaces.
    What should I do?

    thanks
  2. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 12 Aug 2009 Link to this post

    Hello Adam,

    I am not sure if I understand the problem you are facing correctly. Here is an example which illustrates how RadMaskedTextBox works for phone numbers. Can you observe the same problem with it? Please elaborate on this.

    Kind regards,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aron
    Aron avatar
    80 posts
    Member since:
    Dec 2005

    Posted 12 Aug 2009 Link to this post

    Hello,
    Ok so if I'm introducing the input mask on an existing application the previous data will be inconsistent.
    e.g.
    • 123-456-7890
    • 1234567890
    • 123 456 7890
    • (123) 456-7890
    • (123) 4567890
    • 123.456.7890
    • etc
    How can I set the value of a RadInput (with a standard usa telephone mask) when the previous data could be in 5+ different formats?
  5. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 14 Aug 2009 Link to this post

    Hi Adam,

    I still do not understand the problem completely. Could you paste the markup for the MaskedTextBox and provide details what is needed to replicate the undesired behavior?

    Best wishes,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Aron
    Aron avatar
    80 posts
    Member since:
    Dec 2005

    Posted 14 Aug 2009 Link to this post

    Ok, so the phone numbers in the table could like:
    • 123-456-7890
    • 1234567890
    • 123 456 7890
    • (123) 456-7890
    • (123) 4567890
    • 123.456.7890

    If I add a RadInput to my checkout page with a standard usa phone mask - it does not work because the existing data has extra or is missing spaces.


  7. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 20 Aug 2009 Link to this post

    Hi Adam,

    In order to help you we need to know how do you set those numbers. Is it on the client, server side, by pasting the value or simply by typing in the control? It will be appreciated if you paste some of your code/markup and provide step-by-step instructions on how to reproduce the behavior.

    Greetings,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017