PDA

View Full Version : textfield size



boston-george
3 Jun 2011, 12:05 AM
Hi guys!

how can i set size of textfield that for example, the maximum number of characters is 6!
a user can enter only six characters and does not enter 10 characters

I do not want the field in error, I want you just can not type more than 6.

thanks

friend
3 Jun 2011, 5:21 AM
var field = {
xtype: 'textfield',
// Uses HTML maxlength attribute directly to control user input length
autoCreate: {
tag: 'input',
type: 'text',
size: '6',
autocomplete: 'off',
maxlength: '6'
},
fieldLabel: 'Limited Field',
name: 'limited',
width: 90
};