We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7858
    • 97 Posts
    is everything else ok? the list is still empty (with formatTitle)... sure, I can filter it with textbox in backend, but now I want to understand, how should it work with combobox...
      • 4172
      • 5,888 Posts
      I have this:

        "filters":[
          {
            "MIGX_id":1,
            "name":"format_id",
            "label":"format",
            "emptytext":"format",
            "type":"combobox",
            "getlistwhere":{"parent":"[[+format_id]]"},
            "getcomboprocessor":"getcombo",
            "combotextfield":"formatTitle",
            "comboidfield":"id",
            "comboparent":"",
            "default":""
          }
        ]
      


      and that's working
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 7858
        • 97 Posts
        Nope, it does not work (( I get empty combobox. Can the camelcase package name be a problem?

        I've attached my full configuration, if you can take a look.
          • 4172
          • 5,888 Posts
          camelcase shouldn't be an issue here. Have it exactly like you and it is working here.

          ok, debugging.

          change this line in the getcombo-processor:

          //echo $c->toSql();


          to

          echo $c->toSql();


          refresh the CMP-page and you should see the generated sql in the ajax-response.
          then post that sql here.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
          • discuss.answer
            • 4172
            • 5,888 Posts
            wait, I know, what's your issue. Its because of the join.

            You will need:

            [
                {
                  "MIGX_id":1,
                  "name":"format_id",
                  "label":"format",
                  "emptytext":"format",
                  "type":"combobox",
                  "getlistwhere":{
                    "fplFormats.parent":"[[+format_id]]"
                  },
                  "getcomboprocessor":"getcombo",
                  "combotextfield":"fplFormats.formatTitle",
                  "comboidfield":"fplFormats.id",
                  "comboparent":"",
                  "default":""
                }
              ]


            you will also need to change the where in your custom-processor

            from

            parent to fplFormats.parent
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 7858
              • 97 Posts
              Thx!!! Works like charm )

              I don't know, where you get time to help everyone here in forum )