We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37261 ☆ A M B ☆
    • 113 Posts
    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.
      • 40706
      • 128 Posts
      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 Ext.data.SimpleStore({
                      id: 0
                      , fields: [{name: 'id'}, 'name']
                      , data: [
                            ['FR', 'FR']
                          , ['SO', 'SO']
                          , ['JR', 'JR']
                          , ['SR', 'SR']
                      ]
                  })
                  , triggerAction: 'all'
                  , valueField: 'id'
                  , displayField: 'name'
                  , mode: 'local'
              }
        • 31471
        • 206 Posts
        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 9 years, 10 months ago.]
          • 50521
          • 4 Posts
          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 8 years, 9 months ago.]
            Kind regards
            • 36722
            • 101 Posts
            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 https://jsoneditoronline.org/ for stripping out all the whitespace and returns. Collections doesn't like those.
              Shawn Himmelberger
              Himmelberger Design
              https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development