1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    47
    Vote Rating
    0
    gald is on a distinguished road

      0  

    Default Form, pourcent field ?

    Form, pourcent field ?


    in a form, how to create a pourcent field ?
    which is just un number field with a "%" at the end of the number ??

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You can for example check after each keyup if the value contains a % at the end and if not, you add it to there.

  3. #3
    Sencha User
    Join Date
    Feb 2008
    Posts
    47
    Vote Rating
    0
    gald is on a distinguished road

      0  

    Default


    well, ok, i'm going to try this.
    But a don't understand exactly the goal of the NumberFormat which we can set to NumberField.
    beacause the numberFormat is not used to format the displayed number value

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Its to validate the input value or to set the input value if you call setValue. It does not validate input you enter with your keyboard. With validate i mean, that its used to parse it to get a correct Number object or to transform the Number into a correct String.

  5. #5
    Sencha User
    Join Date
    Feb 2008
    Posts
    47
    Vote Rating
    0
    gald is on a distinguished road

      0  

    Default


    ok thanks for your quick answer

  6. #6
    Sencha User
    Join Date
    Feb 2008
    Posts
    47
    Vote Rating
    0
    gald is on a distinguished road

      0  

    Default


    I can't make it work.
    I manage to just add a "%" at the end.
    But the value is not validated so the red underline appear.
    If i a use a numberFormat to allow the pourcent, weird thing appends...

  7. #7
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You should post your code in a small, standalone testcase. Maybe someone can help you with it.

Similar Threads

  1. Ext.form.Field override : Adding an icon to a form field of any type
    By arnold in forum Ext 2.x: User Extensions and Plugins
    Replies: 2
    Last Post: 25 Mar 2011, 6:41 AM
  2. Replies: 5
    Last Post: 24 Jan 2010, 10:06 PM
  3. Form Validation when one field is dependent on another form field
    By lazyProgrammer in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 6 Oct 2008, 3:49 AM
  4. How to add a file field like field to an Ext form
    By soltan13 in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 1 Jul 2007, 3:48 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi