We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35888
    • 8 Posts
    Hi.

    I would like to use modx as my next CMS but I have a specific need to pages linked to tables which must be met in order for me to switch to modx.

    The requirements break down into 3 parts.

    1 - Form controls linked to tables. For example a country drop down box which lists all the countries. If "USA" is selected, then another box would appear offering a selection of states.

    2 - A form which submitted a record to a table. For example there would be a "NFL Football Players" form. When "Dallas Cowboys" is selected, a user could add their favorite player to the form. Player name, position, height, weight, jersey #, etc. would all be added. When the "submit" button is pressed the record would be validated then submitted.

    3 - A dynamic web page would be created on the site based on the submitted record in #2. So if a Troy Aikman record was submitted, the URL might be mysite.com/cowboys/troy-aikman. The page would show the information as static, but users would be able to add comments similar to a blog.

    Is modx able to do something like this? If not, is there an add-on which can? If not, any recommendation on a CMS + add-on that can would be appreciated.
      • 33968
      • 863 Posts
      Hi Ryan, you can definitely accomplish all three - and basically anything - with MODx.

      But it depends on whether you are expecting all this to work ’out of the box’ with a few add-ons; or whether you are prepared to put in a bit of custom php coding. Honestly, I don’t know of any CMS that would do all this without some extra code.

      1 - Form controls linked to tables. For example a country drop down box which lists all the countries. If "USA" is selected, then another box would appear offering a selection of states.
      Have a look at Formit Country Options for how to use the built in Country / State lists with FormIt.

      2 - A form which submitted a record to a table. For example there would be a "NFL Football Players" form. When "Dallas Cowboys" is selected, a user could add their favorite player to the form. Player name, position, height, weight, jersey #, etc. would all be added. When the "submit" button is pressed the record would be validated then submitted.
      Here’s a nice guide on how to set up custom DB tables. You’ll end up with complete xPDO functionality so if you know some php it will be a breeze to create new teams and players from a front-end form. MODx has built in user management, so no problem there.

      3 - A dynamic web page would be created on the site based on the submitted record in #2. So if a Troy Aikman record was submitted, the URL might be mysite.com/cowboys/troy-aikman. The page would show the information as static, but users would be able to add comments similar to a blog.
      With a bit of nudging you can set up friendly urls with a custom request handler to achieve this. You can look at Quip to handle commenting.

      Hope that helps! Don’t forget, there’s plenty of useful information here on the forums and lots of people eager to help if you need it.

      Luke
        • 35888
        • 8 Posts
        Luke,

        I truly appreciate the reply. I am happy to use any supported add-ons.

        I have years of experience as a Microsoft database administrator and application developer, but I have never build a website prior to this year. I have learned a fair amount of HTML and CSS, then built my first sites. I have no knowledge of PHP at all. I have just started learning the language and it clearly wont be something I can use on this project with any degree of proficiency. I can look at existing PHP code and change a field name or other minor adjustments, but that’s about it.

        The reason I was looking to a CMS is so it would do the coding for me and would cover my lack of php knowledge. The website I am building is for a non-profit organization which has no budget. Their goal is to establish a site, then file the paperwork for licensing, and it takes 4-6 months to receive their actual non-profit certification from the US government. They are unable to do any fund raising until then. But a website is going to be necessary to get started so it is a catch-22 situation.

        Depending on the difficulty involved I could either learn the PHP or we can gather a couple hundred dollars together to offer a PHP developer, but I am guessing that wont be enough. Can you offer any idea on the expertise required to write the PHP necessary to make this work?
          • 4172
          • 5,888 Posts
          I would say with some help of the awesome modx-community you will get this to work step by step.
          This doesn’t sound that complicated what you are after.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 33968
            • 863 Posts
            Yes, definitely achievable especially with your technical background.

            Have a look at the article I linked to regarding Custom DB tables for an idea of what level of PHP is required. It may look complex but it in fact simplifies things a lot when it comes to adding/removing/editing items in custom tables.

            Also, it just occurred to me that you could take an existing add-on such as CamperManagement and just change the field names and headings to your football theme. You’d be most of the way there, and would just need to hook up your front end form and user access.

            First things first, you’ll need to understand the basics of modx - here’s a good place to start: http://rtfm.modx.com/display/revolution20/Getting+Started
              • 35888
              • 8 Posts
              Thank you both for the great advice! I will look at the article you mentioned, download modx and give this a shot.