PDA

View Full Version : combo submitting display - WTF?



PCSpectra
26 Jan 2010, 1:39 PM
I have spent the last few hours trying to figure this out, I give up :P




{
xtype: 'combo',
fieldLabel: 'Manufacturer',


anchor: '95%',
minChars: 1,


//name: 'manufacturer',
value: manufacturer,


hiddenId: 'manufacturer_ID',
hiddenName: 'manufacturerID',


allowBlank: false,
forceSelection: true,


valueField: 'id',
displayField: 'name',


store: new Ext.data.JsonStore({
root: 'topics',
fields: ['name', 'id'],
proxy: new Ext.data.HttpProxy({
url: 'services/makes.php'
})
})
}


I have specified hiddenField, removed 'name' and still something I am doing is resulting in my getting the textual value NOT the numeric ID back for the given manufacturer...

I hope this is eomthing easy which someone can point out so I can continue as normal with development.

EDIT | I just figured out what the issue is but no idea how to solve it...seems I must make a selection in the list before the ID is used and not the textual value. Problem is I am updating and the name is passed to the field t avoid having to manually set the selected item based on the ID. Ihave either information so I could do either, which is best and how?

Cheers,
Alex

jsemmanuel
27 Jan 2010, 1:42 AM
a bit of confusion. You have set value to manufacturer. Is that a variable? the value you set should be one of the id field of the store records.
eg value:23 or value:'GM'