PDA

View Full Version : HELP: form cycling with tab



babaqga123
22 Apr 2010, 2:52 AM
Hello, forum people.

I have the following problem:
I have a form which has some items.
As I get it, form has by default the property: layout: 'form'. However, when I try to insert in the form the following code:
activeItem: 0 (meaning my first element should be the active item) I get an error in firebug this.layout.setActiveItem is not a function.

Here is the code of my form (it is a part of a container which does not have any layout managers specified:



xtype: 'form', // FormPanel
labelWidth: 110,
width: 420,
defaultType: 'textfield',
activeItem: 0,
items: [{
fieldLabel: 'ServerIP',
name: 'serverIP',
allowBlank:false,
width:300
},{
inputType:'password',
fieldLabel: 'Terminal Password',
name: 'Terminal Password',
allowBlank:false,
width:300
},{
fieldLabel: 'Company',
name: 'Company',
allowBlank:false,
width:300
},{
fieldLabel: 'Email',
name: 'email',
vtype:'email',
allowBlank:false,
width:300
}
],


buttons:
[
{

}
]

Animal
22 Apr 2010, 3:00 AM
You mean focus.

babaqga123
22 Apr 2010, 3:37 AM
For some reason I think I will have to write a custom focus() function, since as far as I see, when i set focus to a field, for example, a textfield, it doesn't allow me to write to it immediately. Any clues?