Hi Folks,
Here's my form:
It's a tabpanel with two tabs. Settings and Admin.
Code:
this.items = [{
xtype:'tabpanel',
activeTab: 0,
defaults:{autoHeight:true, bodyStyle:'padding:10px'},
items:[{
title:'Settings',
layout:'form',
defaults: {width: 230},
defaultType: 'textfield',
items: [ {
fieldLabel: 'DID',
name: 'did',
allowBlank:false
},{
fieldLabel: 'Target',
name: 'target',
}]
},{
title:'Admin',
layout:'form',
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'Username',
name: 'username',
},{
fieldLabel: 'Secret',
name: 'secret'
},
new Ext.form.ComboBox({
fieldLabel: 'DIDProvider',
name: 'provider_id',
forceSelection : true,
displayField:'name',
hiddenName:'didprovider',
store: new Ext.data.JsonStore({
url: '/getDIDProviders',
fields: ['name', 'provider_id']
}),
typeAhead: true,
triggerAction: 'all',
emptyText:'Select a provider...',
selectOnFocus:true,
width:190
})]
}]
}]
WHen I pull the data to my form using:
Code:
loadForm : function(id) {
this.getForm().load({url:'/getDIDFormData'+id, waitMsg:'Loading Data...'});
},
THis successfully pulls down a JSON string that loads the fields in the front (Settings) tab, but the data never gets to the back (Admin) tab. Do I need to do anything special to the JSON to get my data loaded onto the back page?
I saw some other posts where people were doing this manually. Is that the only way to load mutlitab forms?
Cheers,
-Joe