Hello,
Can someone please help me figure out why the code below is posting the display field of a combo box to the server and not the value field?
Thanks!
Jeff
Code:
f = new Ext.form.Form({
labelAlign: 'right'
});
var store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: "get_types"}),
reader: new Ext.data.ArrayReader(
{ id: 0 },
[ {name: 'id', type: 'int'}, {name: 'name'} ]
)
});
store.load();
f.fieldset(
{legend: "Options"},
new Ext.form.ComboBox({
fieldLabel: 'File Type',
store: store,
emptyText:'Select a file type...',
width:200,
displayField: 'name',
valueField: 'id',
triggerAction: 'all',
name: 'fileType',
allowBlank: false
})
);
var submit = f.addButton({
text: 'Submit',
handler: function() {
f.submit({
url:'submit_options',
success: this.onSuccess,
failure: this.onFailure
});
}
});
uploadDlg = new Ext.BasicDialog('uploadDlg', {
width:520,
height:200,
resizable: false,
shadow:true,
modal:true,
title: 'Select Options'
});
f.render(uploadDlg.body);
uploadDlg.show();