We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44307
    • 7 Posts
    I'm new to modx, though I've found the set-up of a site relatively simple so far, but I guess I've run into a bit of a mental hurdle when it comes to managing custom content. I would appreciate any guidance in doing the following in the correct "modx" way.

    Scenario: I want visitors (not logged in, no account required) to a site to be able to: fill out a form (message, name, city, email address, checkbox to give permission to post submitted content publicly) --> submit the form --> an admin reviews the submission and decides if it should be posted publicly (the admin may also want to give higher priority in the listing of some submissions) --> list the approved submissions in a stream on a page.

    I like the the way that comments appear under articles in the modx manager and would like something like that for this custom form content.

    The site will be hosted in the modxcloud. I have successfully built a contact for using FormIT and I am using Articles for blog type entries. I am also using Babel to serve the site bilingually (though the above mentioned custom form would be context specific - meaning it would only have the content that is submitted within a given context appear in that context only - each context would have its own version of the custom form). FURLs are working just fine on my site.

    So I get how to use Plugins and how they manage their specific content and I think I understand the role of TVs to add fields to existing content types, but the part that I am fuzzy on is how does one handle custom content generated by visitors to a site and managing that data neatly under a designated resource (like comments).

    Anything to get me going in the right direction would be appreciated.

    Thanks in advance for your help.

    Modx: ver 2.2.8-pl
    Platform: modxcloud [ed. note: vytukas last edited this post 13 years, 3 months ago.]
      • 44234
      • 219 Posts
      You might want to have a look at this extra: http://modx.com/extras/package/tickets

      I don't have any experience with it myself, but from the description it may be able to achieve what you want.
        Find me on Twitter, GitHub or Google+
        • 37042
        • 384 Posts
        Hi vytukas

        I know this wont answer all your issues but I have found an Extra called FormSave to be really handy for storing user submitted data within MODX.

        With regard to turning this data into a Resource, a developer did tell me they could get MODX to turn these form submissions into automatically created (but not published) resources.

        Thought that may be of interest but there are probably lots of ways to handle this. Good luck with it.
          ...
          • 4172
          • 5,888 Posts
          I would use formit2db to save the submitted data into a custom-table.
          Create a CMP with help of MIGXdb for reviewing the submissions and publish them.
          Use a snippet like migxLoopCollection to list the published submissions on the page.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 44307
            • 7 Posts
            Quote from: davidpede at Jul 16, 2013, 09:09 AM
            You might want to have a look at this extra: http://modx.com/extras/package/tickets

            Thanks davidpede, I will take a look at the extra.
              • 44307
              • 7 Posts
              Quote from: eladnova at Jul 16, 2013, 09:28 AM
              Hi vytukas

              I know this wont answer all your issues but I have found an Extra called FormSave to be really handy for storing user submitted data within MODX.

              With regard to turning this data into a Resource, a developer did tell me they could get MODX to turn these form submissions into automatically created (but not published) resources.

              Thanks eladnova - will look at FormSave.
                • 44307
                • 7 Posts
                After evaluating all of the suggestions, I decided to implement your solution Bruno17. Thanks!

                I've run into two issues - the first was formit2db couldn't see my table (addPackage was just not happy - until I rewrote that line with what should have been passed in via variables). And I'm seeing a similar problem in MIGX trying to implement a CMP. I set up my columns but they do not populate with the data in the DB. I get the following error:
                 [2013-08-30 09:33:39] (ERROR @ /assets/components/migx/connector.php) Could not get table class for class: pasisakymai
                [2013-08-30 09:33:39] (ERROR @ /assets/components/migx/connector.php) Could not get table name for class: pasisakymai
                [2013-08-30 09:33:39] (ERROR @ /assets/components/migx/connector.php) Could not get table class for class: pasisakymai
                [2013-08-30 09:33:39] (ERROR @ /assets/components/migx/connector.php) Could not get table name for class: pasisakymai
                [2013-08-30 09:33:39] (ERROR @ /assets/components/migx/connector.php) Error 42000 executing statement: 
                Array
                (
                    [0] => 42000
                    [1] => 1064
                    [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `pasisakymai` WHERE `pasisakymai`.`deleted` = '0' ORDER BY id ASC LIMIT 10' at line 1
                )


                I'm running on modx 2.2.8