We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21739
    • 49 Posts
    I've created a package & custom table via MIGX Management. Everything, including regular textbox filters are working great!

    However, in stead of using textbox filters, I would like to create a combobox filter, populated by the distinct values of a specific field from my table.
    Similar to the dropdown filter from this tutorial.

    Is this possible? If so, any info on what to specify in the db-filter configuration would be much appreciated, thanks! [ed. note: nondotzero last edited this post 10 years, 1 month ago.]
      • 4172
      • 5,888 Posts
      this is possible, very easylie.
      If you would give a bit more info, the answer could be more specific for your case
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 21739
        • 49 Posts
        Quote from: Bruno17 at Mar 25, 2014, 03:31 PM
        this is possible, very easylie.
        If you would give a bit more info, the answer could be more specific for your case

        Let's assume my table is called "registrations" and that a field called "category" can contain a different value (not multiple, just one).
        The comboxbox filter would have to display the various distinct "category" values as collected from the different table rows.

        Basically, via Formit, a registration form (containing a select element with various options) is submitting a bunch of data to a custom table and I'd like to have a combobox filter (in the migx db grid) so my client can filter the submitted forms by selecting a specific category.

        Hard coding the various options isn't possible since the customer can change the 'category option values' in the registration form over time.

        Thnx!
          • 4172
          • 5,888 Posts
          try:

          filtername: reg_category
          label: category
          empty text: --filter by category--
          filter type: combobox
          getlist where: {"category":"[[+reg_category]]"}
          getcombo processor: getcombo
          getcombo textfield: category
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 21739
            • 49 Posts
            Quote from: Bruno17 at Mar 25, 2014, 04:06 PM
            try:

            filtername: reg_category
            label: category
            empty text: --filter by category--
            filter type: combobox
            getlist where: {"category":"[[+reg_category]]"}
            getcombo processor: getcombo
            getcombo textfield: category

            Thanks, works like a charm!
            I cannot believe it was this simple. Unfortunately I couldn't find the right processor name, 'getcombo'.
              • 21739
              • 49 Posts
              One additional / related question, is there an out of the box way to use the date filter with the 'createdon' field in my table?
                • 49079
                • 12 Posts
                Quote from: nondotzero at Mar 26, 2014, 08:56 AM
                Quote from: Bruno17 at Mar 25, 2014, 04:06 PM
                try:

                filtername: reg_category
                label: category
                empty text: --filter by category--
                filter type: combobox
                getlist where: {"category":"[[+reg_category]]"}
                getcombo processor: getcombo
                getcombo textfield: category

                Thanks, works like a charm!
                I cannot believe it was this simple. Unfortunately I couldn't find the right processor name, 'getcombo'.

                Hello, sorry for my English!!!

                I try this variant, combobox is work. But i have one problem, when i open the page with migx + combobox filter i get alert window with error 401 Unauthorized and system login request. After closing these windows my combobox filter works correctly.

                Where problem? Modx 2.4.2 / Migx 2.9.6

                Look at attached image please. [ed. note: artexoid last edited this post 8 years, 4 months ago.]
                  • 49079
                  • 12 Posts
                  Hay??!! )) Anybody here??? )))
                    • 4172
                    • 5,888 Posts
                    Sure, but never have seen that issue, so I can't say anything to the issue without some testing.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 49079
                      • 12 Posts
                      My testing with chrome developer panel and php-xdebug revealed a problem in HTTP_MODAUTH for first request. I don't know why request don't have this param... (((. Very strange behavior... (((

                      Thank you for answer!!