3.2.0

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
May 8,
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)
May 9,
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
May 9,

This topic is archived.

See also:


Back to support forum