combobox - MODx Revo: Empty comboboxes on the Admin Panel -
i installed copy of modx revolution 2.3.1-pl. , fine, comboboxes empty. can see combobox data comes json/ajax , json correct. anyway cannot see proper values on combo box.
what's wrong that?
first create imaevents.combo.js file here
modxcloud\assets\components\yourcomponentfolder\js\mgr\widgets
, add code inimaevents.combo.js
:imaevents.combo.event_status = function(config) { config = config || {}; ext.applyif(config,{ store: new ext.data.arraystore({ id: 0 ,fields: ['event_status','display'] ,data: [ ['','event status'] ,['normal','normal'] ,['closed','closed'] ,['cancelled','cancelled'] ,['full','full'] ,['waiting list','waiting list'] ] }) ,mode: 'local' ,displayfield: 'display' ,valuefield: 'event_status' }); imaevents.combo.event_status.superclass.constructor.call(this,config); }; ext.extend(imaevents.combo.event_status,modx.combo.combobox); ext.reg('imaevents-combo-event_status',imaevents.combo.event_status);
use combo box calling xtype "imaevents-combo-event_status"
{ xtype: 'imaevents-combo-event_status' ,fieldlabel: _('imaevents.event_status') ,name: 'event_status' ,anchor: '100%' }
Comments
Post a Comment