• Passing URL Parameter Into Custom Form#

  • taiyo1578 Reply #1, 1 year, 7 months ago

    Reply
    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?
    Many thanks.


  • BobRay Reply #2, 1 year, 7 months ago

    Reply
    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?
    Many thanks.

    What version of MODx?

    Are you having trouble getting the URL in the snippet, or having the form pick up the value?


  • taiyo1578 Reply #3, 6 months ago

    Reply
    I'm using Evo....and I'm not sure where the problem exists. Anyone have sample code that does this?


  • BobRay Reply #4, 6 months ago

    Reply
    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']);