We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5021
    • 2 Posts
    Hello.
    Is it possible to connect a modx revolution users with one or several records of a database.
    The user should login into system and have possibility to insert, edit and delete his information (for example price-lists of his enterprises)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I would presume that the best way to do this would be to have a page he goes to on login, and a form-generating snippet that loads up his info using his login data to generate the form and process its submission. The same page would work for all users.

      Here’s an example of a similar project I did in Evo using AJAX and extjs. With extjs it’s not difficult to make the data grid with editing capabilities.

      http://sottwell.com/datagrid-1.html
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 22295
        • 153 Posts
        Your question is quite generic, as you’re not asking about updating user info (such as email or name), but your example was related to your data structure ("for example price-lists of his enterprises")
        So - I’ll answer generic: Yes, you can.. Look for two things:
        XPDO - for managing the data
        Connectors - for easily creating your custom front-end
        Or simpler - you can also use formit (http://svn.modxcms.com/docs/display/ADDON/FormIt) snippet and add your custom hook.
          • 5021
          • 2 Posts
          Quote from: sottwell at Jul 28, 2010, 11:02 AM

          I would presume that the best way to do this would be to have a page he goes to on login, and a form-generating snippet that loads up his info using his login data to generate the form and process its submission. The same page would work for all users.

          Here’s an example of a similar project I did in Evo using AJAX and extjs. With extjs it’s not difficult to make the data grid with editing capabilities.

          http://sottwell.com/datagrid-1.html


          Thanks, i have understood.