On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • The first one will always be checked, after that any ANDs will be "anded" with the first one and any ORs will be "orred" with the first one. You can make it more complex, but that will complicate the where statement.

    Can you describe what you actually want?
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
    • Quote from: BobRay at Oct 09, 2015, 09:18 PM
      The first one will always be checked, after that any ANDs will be "anded" with the first one and any ORs will be "orred" with the first one. You can make it more complex, but that will complicate the where statement.

      Can you describe what you actually want?

      OK thanks, I'd like them to be able to search by 1 or more criteria individually - and also, an option to add criteria together to narrow the search...
      • I'm afraid I need more to go on. Do you have a user interface created for the search that will let you determine what kind of search it will be? You could post a copy of the form, and a description of what you want to happen based on the submitted results.




          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
        • Quote from: BobRay at Oct 10, 2015, 03:51 AM
          I'm afraid I need more to go on. Do you have a user interface created for the search that will let you determine what kind of search it will be? You could post a copy of the form, and a description of what you want to happen based on the submitted results.





          OK thanks Bob. I think, I will just leave it as it is for now - if the client wants to change it later I will update on this forum post. Thanks wink
          • I struggled with a similar problem, as much as I like using xPDO, I finally broke down and just created an SQL query string that I used to query the table.

            It was much easier to develop since I was able phpMyAdmin to build and test the query string. Once I had a query string that gave me the results I wanted, it was just a matter of writing code to plugin the values being sent by the form.
              Michael Regan
              TIMR Web Services
              Phone: 250.218.5284
              Eamil: mregan@timr.ca
              Website: timr.ca
            • Quote from: timrca at Nov 15, 2015, 06:42 PM
              I struggled with a similar problem, as much as I like using xPDO, I finally broke down and just created an SQL query string that I used to query the table.

              It was much easier to develop since I was able phpMyAdmin to build and test the query string. Once I had a query string that gave me the results I wanted, it was just a matter of writing code to plugin the values being sent by the form.

              Sounds like an interesting approach - any examples you can share?