We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42113
    • 2 Posts
    I know you can use Form-it but it seems an arduous task to bring over to Modx a forms based system especially when there are other tasks that php may be doing such as pulling in lists, posting recursively to databases etc... I guess I am wondering how others have handled pages that must use php to interface with a backend database. Do you just set that page up with a weblink and perhaps just a "back" and "home" link on the form pages. I am sorry if this post is confusing. I wasn't sure how to explain myself. I seem to have gotten over every other hurdle with Modx but this one.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      For myself, I always convert any forms to FormIt. It may take a bit of time in the beginning, but it is much better later when the inevitable maintenance comes up and everything is done in the same way. Using pre-hooks and post-hooks for database access makes it possible to do anything with FormIt. It's usually possible to copy the relevant PHP code from the other system with minimal adjustments to work with the MODx system.

      If it's really serious, then you can of course just use the other system's code, with a snippet to initialize it and include it into the MODx system. I have on occasion even used an iframe to embed an extensive external application. For example, embedding the "dada" perl mailing system manager into an iframe works very well.
        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
        • 42113
        • 2 Posts
        Thanks for the insight Susan. Your thoughts have been invaluable. I think in the long term I could see transitioning some of the forms to Modx with Formit but in the short term, I think, the iframe solution will work well. I tried it out and there seems to be no drawback for the file living on the root folder and accessing the same css and javascript. I just turned the iframe code into its own "chunk" in a way and stripped out the old template code from the existing site. I had thought of an iframe at first but thought there might be some drawbacks to stripping the file down in this way. It actually seems seamless. This is my first venture back into CMS/F since the old Post Nuke days. The only reason I began to look at again is by stumbling on an article about Modx and its template approach to CMS. The deeper I delve the more pleased that I am. Almost all the original drawbacks have been addressed. Thank you so much for your help.