We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29201
    • 239 Posts
    I’ve got the URL parameter passed from one page to my form page however I’m not able to get the value of my form fields to grab this.

    I’ve tried creating a snippet at the top of my template to grab the parameter off the URL and place it into a variable ....then just outputting my variable in the form field but no luck.

    Can someone please help me? huh

    Many thanks.
      • 3749
      • 24,544 Posts
      Quote from: taiyo1578 at Oct 21, 2010, 10:58 PM

      I’ve got the URL parameter passed from one page to my form page however I’m not able to get the value of my form fields to grab this.

      I’ve tried creating a snippet at the top of my template to grab the parameter off the URL and place it into a variable ....then just outputting my variable in the form field but no luck.

      Can someone please help me? huh

      Many thanks.

      What version of MODx?

      Are you having trouble getting the URL in the snippet, or having the form pick up the value?
        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
        • 29201
        • 239 Posts
        I'm using Evo....and I'm not sure where the problem exists. Anyone have sample code that does this?
          • 3749
          • 24,544 Posts
          Try this. Put this in the form where you want the value:

          [+placeholderName+]


          Then in your snippet at the top of the page:

          $modx->setPlaceholder('placeholderName', $_REQUEST['variableName']);

            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