I stuck with ComboBox widget. It sends value instead of id even though I use it this way:
MODx.combo.WeekDay = function(config) {
config = config || {};
Ext.applyIf(config,{
displayField: 'name'
,valueField: 'id'
,mode: 'local'
,store: new Ext.data.SimpleStore({
fields: ['id', 'name'],
data: [[1, 'mon'], [2, 'tue']]
})
,emptyText: 'Week day'
,editable: false
});
MODx.combo.WeekDay.superclass.constructor.call(this,config);
};
Ext.extend(MODx.combo.WeekDay, MODx.combo.ComboBox);
Ext.reg('schedule-combo-weekday', MODx.combo.WeekDay);
//Then in grid config:
{
xtype: 'schedule-combo-weekday'
,fieldLabel: _('schedule.week_day')
,name: 'week_day'
,id: 'schedule-'+this.ident+'-week_day'
,width: 200
}
It seems valueField totally doesn't work. I see the field from 'displayField' in form array before submit. What am I doing wrong? Pleeeeease help!