James wrote:

> Hello All
>
>  
>
> Anybody figure out to to-do input formatting:
>
>  
>
> Exam: I want to save a phone number as 9991234567
>
> But I want it to appear on input: (999) 123-4567
>
>  
>
> Any help would be appreciated
>
>  
>

http://www.darronschall.com/downloads/fti.swf

This component will be available as part of the IFBIN service.  I've 
built a FormattedTextInput component (for both Flash and Flex) that 
allows you to specify a format mask, and it will restrict the user's 
input so that it matches the mask.

Valid format 'input placeholder' characters:
    # - any digit  (0-9)
     a - lowercase letter
    A - uppercase letter
    Z - any letter
    * - any letter or digit

Example usage:
    my_ti.format = "(###) ### - ####";

    Then, to get the value of out it, use:  my_ti.value   - that will 
return just the input that matches the input placeholders, ie in the 
scernario about, .value will just be 10 digits (with formatting removed).

    If you set the .text property of the component, it will 
automatically format it as well:

    my_ti.text = "5559991111";  // will display according to the format

If you want this as a Flex component, you'll have to wait until Flex by 
Example ships.  The Flash component was part of my talk on Extending 
Components at Flash in the Can in april.  You can also either find my 
Flash source and tweak it to work with Flex, or hope someone else builds 
it for you..  but these are the types of high-quality examples and 
useful code snippets that you'll see in Flex by Example.  ;-)

-d




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h53s047/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123014254/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to