:: Forum >>

how to modify format subclass?

I am trying to modigy or make a new subclass for phone number format. Could you give me a simple example about that? I am going to make the following code work:

var Phone = new AW.Formats.Number;
Phone.setTextFormat("(###)###-####");

Thanks,
mrhsh
Thursday, May 8, 2008
Look at the implementation of the existing formats. I still cannot understand why you consider the phone to be a number - for me it looks more like a string.
Alex (ActiveWidgets)
Friday, May 9, 2008
It not necessary to be a number. If it works, I like to use

var Phone = new AW.Formats.String;
Phone.setTextFormat("(###)###-####");

Can I use this way to format the phone number? Our phone number in database are pure numbers. I can convert them to string before the format. Another need is SSN. It needs format like ###-##-####.

Could you tell me how to find all existing formats in your document?

Thanks,
mrhsh
Friday, May 9, 2008

This topic is archived.


Back to support forum

Forum search