PDA

View Full Version : Using emptyText in TextField



ytppa
13 Dec 2011, 8:13 PM
Hi.

I use a TextField in my form with an option emtyText. When user submits a form without entering text in this TextField i get the value equal to my option emptyText. But i'm trying to use it only as a hint.

Is it possible? And how if it is?

Here is my declaration of TextField:

s_f_bd = new Ext.form.TextField({
id: 'bd',
name:'bd',
fieldLabel: 'Birth date',
allowBlank:true,
anchor: '100%',
emptyText: '20-07-1999'
});

vadimv
13 Dec 2011, 11:38 PM
make submitEmptyText false, http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.action.Action-cfg-submitEmptyText