[CLOSED] [1.0] Currency field?

  1. #1

    [CLOSED] [1.0] Currency field?

    Do you have any suggestions / examples as to how a currency field could be created in a FormPanel?

    E.g. Similar to the NumberField, but the number would be formatted with a currency symbol and commas when the field is initially populated, or after editing:

    145321.20 would be formatted to £145,321.20, and when focusing on the control to edit it return the value to 145321.20

    Any suggestions would be much appreciated!

    Many thanks,

    Dan
  2. #2

    RE: [CLOSED] [1.0] Currency field?

    Hi,

    Please test the following code
    <ext:TextField ID="TextField1" runat="server" MaskRe="/[0-9\$\.]/">
                <Listeners>
                    <Focus Handler="this.setValue(this.getValue().replace(/[$\,]/g, ''));" />
                    <Change Handler="this.setValue(Ext.util.Format.usMoney(newValue.replace(/[$\,]/g, '')));" />
                </Listeners>
            </ext:TextField>
  3. #3

    RE: [CLOSED] [1.0] Currency field?

    Hi Vladimir,

    Thanks - worked great.

    Dan

Similar Threads

  1. Currency sign.
    By cisco in forum 2.x Help
    Replies: 0
    Last Post: Aug 01, 2012, 4:10 PM
  2. [CLOSED] Gridpanel - currency column
    By JonG in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 20, 2010, 9:58 AM
  3. currency euro
    By maxdiable in forum 1.x Help
    Replies: 1
    Last Post: Jul 28, 2009, 10:53 AM
  4. Currency format
    By Gianni in forum 1.x Help
    Replies: 2
    Last Post: Jul 20, 2009, 5:32 AM
  5. [CLOSED] NumberField and Currency
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Sep 10, 2008, 6:02 PM

Posting Permissions