Abdul,
Thanks for your input, I'll try to put together some code and send it to the group for review and maybe find some help. This question looks to me very basic and finding the right way to do it will save me some time down the road.
My client want the input form field to be formatted but I ran in various problems with this... the formatter changes the value from Number to String and in case the form elements add in a total or are submitted on the server side, I need them "unformatted".... At this moment it looks to me that the formatter is usefull only for NON-input fields.... and please correct me if I'm wrong...
Another thing that I don't know is how to restrinct the entry number in a text box to a predefined mask,
###.## or #,###.##; don't know how to do it or if it's doable...Having this it would be easy to "unformat".... I'll get back to the forum with the code I use.
Thank you very much for your time.
Valy
Abdul Qabiz <[EMAIL PROTECTED]> wrote:
Hi,
No, Formatter doesn't have any unformat method. Probably, formatting is
undoable unless you extend the formatter and add a unformat method with
reverse logic..
You can have your server-side script to process a formatted string. Its
always better and less work on server?
Another way is you can keep a copy of original value before formatting &
send that value to server?
But why would want to do that? Can you describe the use-case & show us your
code, I might give some idea in its context.
-abdul
-----Original Message-----
From: Valy Sivec [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 8:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Formatters
Hello,
I have a simple question regarding the way to use formatters. In case I
attach a number formatter or currency formatter to a form item should I
"unformat"
the input text value before sending it back on the
server side?. Is it something that am I missing?
Shouldn't the value remain "unformatted" for data processing and the format
to be applied only for display/rendering?.
Any feedback will be greatly appreciated, and thank you for taking time
reading this email.
Thanks,
Valy
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
Yahoo! Groups Links
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com