Force an ExtJS textfield to uppercase

To style a textfield to uppercase you only need to add a style to the textfield’s config option. For example; { xtype:’textfield’, fieldLabel:’User ID’, itemId:’userid’, style:’text-transform: uppercase’, listeners:{ scope:this, specialkey: function(f,e){ if(e.getKey()==e.ENTER){ Ext.Msg.alert(”,’You typed ‘+ loginForm.getComponent(‘userid’).getValue().toUpperCase()); } } } } (Read More…)