We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16633
    • 116 Posts
    Hello,

    I am looking for some assistance in a task I am not sure the best way to tackle.

    I have a form that I need to store the data in my database when it is submitted.

    Once data is submitted I need a page in the manager that displays this data.

    Could anyone advise of a method of completing this task?

    Thanks.
    Landon
      --
      Landon Poburan
      Web Designer and Developer

      http://www.categorycode.ca
      http://www.landonp.com
      • 3749
      • 24,544 Posts
      What version of MODx?
        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
        • 24865
        • 289 Posts
        Does this concern frontend or backend submission? In the backend, you can simply collect the form’s fiels with Ext.
        Ext.fly('form-id').getForm().getValues();

        Submit that to a processor of a custom component or just a processor in the modx dir and finished! smiley
          @MarkGHErnst

          Developer at Adwise Internetmarketing, the Netherlands.
          • 16633
          • 116 Posts
          It is the latest version of Revolution.

          And the form will be processed on the front end, not within the manager.
            --
            Landon Poburan
            Web Designer and Developer

            http://www.categorycode.ca
            http://www.landonp.com
            • 4172
            • 5,888 Posts
            for the form you can use formit and something like formit2db or formit2resource as hooks.
            If you use formit2resource you will see them as resources in the manager-resource-tree.

            If you store them in your own table you will need to create a CMP (custom-manager-page) to display them.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 16633
              • 116 Posts
              Quote from: Bruno17 at Oct 19, 2010, 12:20 PM

              for the form you can use formit and something like formit2db or formit2resource as hooks.
              If you use formit2resource you will see them as resources in the manager-resource-tree.

              If you store them in your own table you will need to create a CMP (custom-manager-page) to display them.

              I think formit2resource would be the best option in this case. Is this part of formit or an added snippet?

              Then I can display it 2 ways:
              1) Provide a manager login to a user that can only view those resources.
              2) Create a front end user login and use getresources to display those resources on the front end.

              I wonder which would be quickest?
                --
                Landon Poburan
                Web Designer and Developer

                http://www.categorycode.ca
                http://www.landonp.com
                • 4172
                • 5,888 Posts
                Quote from: landonpoburan at Oct 19, 2010, 12:45 PM

                I think formit2resource would be the best option in this case. Is this part of formit or an added snippet?
                formit2resource (see my signature) is an example how you can use formit-hooks to store formit-form-datas to resources.
                You have to alter the code to save them as private resources to a given resource-group.

                Quote from: landonpoburan at Oct 19, 2010, 12:45 PM

                Then I can display it 2 ways:
                1) Provide a manager login to a user that can only view those resources.
                2) Create a front end user login and use getresources to display those resources on the front end.

                I wonder which would be quickest?

                you can do both. It depends.......
                I think its easier to create a front-end-login for them and display those resources with getResources.
                May be others have different suggestions.

                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 16633
                  • 116 Posts
                  Quote from: Bruno17 at Oct 19, 2010, 02:48 PM

                  Quote from: landonpoburan at Oct 19, 2010, 12:45 PM

                  I think formit2resource would be the best option in this case. Is this part of formit or an added snippet?
                  formit2resource (see my signature) is an example how you can use formit-hooks to store formit-form-datas to resources.
                  You have to alter the code to save them as private resources to a given resource-group.

                  Quote from: landonpoburan at Oct 19, 2010, 12:45 PM

                  Then I can display it 2 ways:
                  1) Provide a manager login to a user that can only view those resources.
                  2) Create a front end user login and use getresources to display those resources on the front end.

                  I wonder which would be quickest?

                  you can do both. It depends.......
                  I think its easier to create a front-end-login for them and display those resources with getResources.
                  May be others have different suggestions.



                  Thanks so much. I will be starting this tonight. How does the snippet create the resource though? Say my form has 50 fields, does it just create it as text in the resource?
                    --
                    Landon Poburan
                    Web Designer and Developer

                    http://www.categorycode.ca
                    http://www.landonp.com
                    • 4172
                    • 5,888 Posts
                    you can create for each field a TV or store them all as an array in Json-format to one TV or into the content-field, for example.
                    Then you need a little snippet which encodes the Json before you can display this fields.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 16633
                      • 116 Posts
                      Quote from: Bruno17 at Oct 19, 2010, 03:52 PM

                      you can create for each field a TV or store them all as an array in Json-format to one TV or into the content-field, for example.
                      Then you need a little snippet which encodes the Json before you can display this fields.

                      Is their a default that formit2resource uses?
                        --
                        Landon Poburan
                        Web Designer and Developer

                        http://www.categorycode.ca
                        http://www.landonp.com