View Full Version : Static Combobox

27 Apr 2011, 6:51 AM
hi guys,

i'm trying to use Combobox mode local.
The store is populated in php-side before combobox was created but i can't use id-name structure:

xtype: 'combo',
width: '300',
emptyText: 'select...',
displayField: 'name',
valueField: 'id',
triggerAction: All,
mode: 'local',
store: {
xtype: 'simplestore',
fields: ['id','name'],
data: risp.store


where risp is an object from php-side,
how can i create this "risp" object in php-side to retrive id-name and show name but pass id in submit?


27 Apr 2011, 8:38 AM
Add hiddenName: 'id' to your Combo's config, where this is the request parameter name which will be used during a submit.

I recommend against using field names like 'id' though as this can confuse ExtJs in some circumstance.