We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    One area of MODx that I just haven’t really gotten dug into is forms: how does MODx handle passing form variables, either via a post or get method? I’m quite comfortable doing this when I code sites by hand, e.g. using PHP’s REQUEST method... but I assume MODx has some API methods that would let me grab any variables passed along with a url.

    Can anyone suggest a place to start?
      • 10487 MODX Staff
      • 1,535 Posts
      I’m quite comfortable doing this when I code sites by hand, e.g. using PHP’s REQUEST method
      That is pretty much it, MODx doesn’t reinvent the wheel in that area ($_POST and $_GET also valid) - basically, you can use any methods in a snippet/module/plugin as you would use in a hand-coded script.

      Remember, if you want to access any request variables in a snippet, you would need to have either the page uncached or, probably more preferable, the snippet uncached (using [! ... !])
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Ah... somehow I thought it would be more complicated than that. Ok. That’s simple enough. Thanks!