New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • pyrographics Reply #1, 4 years ago
    How would one go about adding a MODX Combo to a Collections package list as an editor?

    So far I have the editor set to: {"xtype":"modx-combo","data":["FR","SO","JR","SR"]} but the data does not show up as options. Is it just not implemented? The TV is a dropdown menu so I'd like to only allow the options contained in the TV to be edited from the list.
    • Michael Engel Reply #2, 4 years ago
      I Did not understand what you are doing. But I think the data element is just wrong.
      It should be something like that:

                  xtype: 'modx-combo'
                  , store: new{
                      id: 0
                      , fields: [{name: 'id'}, 'name']
                      , data: [
                            ['FR', 'FR']
                          , ['SO', 'SO']
                          , ['JR', 'JR']
                          , ['SR', 'SR']
                  , triggerAction: 'all'
                  , valueField: 'id'
                  , displayField: 'name'
                  , mode: 'local'
      • Hi,
        form me, your code gives an error:
        Uncaught TypeError: undefined is not a function Ext-all.js:21 [ed. note: vhollo last edited this post 4 years ago.]
        • Is there any update on this issue? I tried setting data: [["value1"],["value2"]] (and few other combinations as well) with no luck, so I wonder is there any way to add modx-combo with your own values to the list?
          Just to make it clear: I'm trying to add a dropdown-list for my TV in the Collections view.
          [ed. note: vallev last edited this post 2 years, 11 months ago.]
            Kind regards
          • I've been noodling on this myself as well for a while. Any one else have a xtype string that is confirmed working? I found this tool for stripping out all the whitespace and returns. Collections doesn't like those.
              Shawn Himmelberger
              Himmelberger Design
    "" target="_blank" rel="nofollow">MODx Web Design |"" target="_blank" rel="nofollow">MODx Web Development