I am working on my first addon that will be open to the public and I am getting frustrated with the modx-combo-user in the manager. This is a modx 2.2 install.
My create window code:
UG.window.CreateUserSetting = function(config) {
config = config || {};
Ext.applyIf(config,{
title: _('ug.create')
,url: UG.config.connectorUrl
,baseParams: {
action: 'mgr/usersettings/create'
}
,fields: [{
xtype: 'modx-combo-user'
,fieldLabel: _('ug.user')
,name: 'g_user'
,hiddenName: 'g_user'
,anchor: '100%'
},{
xtype: 'textfield'
,fieldLabel: _('ug.title')
,name: 'g_title'
,anchor: '100%'
},{
xtype: 'textarea'
,fieldLabel: _('ug.description')
,name: 'g_description'
,anchor: '100%'
}]
});
UG.window.CreateUserSetting.superclass.constructor.call(this,config);
};
Ext.extend(UG.window.CreateUserSetting,MODx.Window);
Ext.reg('ug-window-usersettings-create',UG.window.CreateUserSetting);
What happens is the combo box appears fine and it populates with users. When I click the save button it either saves as a "0" in the database or errors out, like it's not passing the value from the combo box. The part that is frustrating me is that I already built another part of the mgr using the modx-combo-usergroup and it worked perfectly.
Clip of what I did with modx-combo-usergroup to work in my create window:
,fields: [{
xtype: 'modx-combo-usergroup'
,fieldLabel: _('ug.usergroup')
,name: 'usergroup'
,hiddenName: 'usergroup'
,anchor: '100%'
},{
Any ideas?