2 Nov 2010 3:00 AM #1
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 Nov 2010 3:28 AM #2
You can for example check after each keyup if the value contains a % at the end and if not, you add it to there.
2 Nov 2010 5:23 AM #3
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
2 Nov 2010 5:24 AM #4
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.
2 Nov 2010 5:25 AM #5
2 Nov 2010 7:12 AM #6
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...
2 Nov 2010 7:17 AM #7
You should post your code in a small, standalone testcase. Maybe someone can help you with it.
By arnold in forum Ext 2.x: User Extensions and PluginsReplies: 2Last Post: 25 Mar 2011, 6:41 AM
By wceuppens in forum Ext 3.x: BugsReplies: 5Last Post: 24 Jan 2010, 10:06 PM
By lazyProgrammer in forum Ext 2.x: Help & DiscussionReplies: 8Last Post: 6 Oct 2008, 3:49 AM
By soltan13 in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 1 Jul 2007, 3:48 AM