passing parameters on the URL

Discussion in 'Customization & add-ons' started by skippybosco, May 4, 2004.

  1. skippybosco

    skippybosco Guest

    Is it possible to pass parameters on the URL of the signup page?

    Specifically what I'm talking about is providing a link from another site which pre-populates a custom field like "Referred by"...

    Another example may be pre-populating the coupon field from a click on a banner ad..
  2. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    Yes.
    Just open HTML source of your signup page and find field name you want to pre-populate. Then add GET parameters to signup URL, like

    /amember/signup.php?coupon=123123
  3. manishie

    manishie Guest

    ok, this almost works perfect for me as well.

    the only problem is that i don't want the user to see or to be able to change the field that is being passed via url.

    i'm basically passing a field that keeps track of which site referred the user to our site. so the url is something like "mysite.com/membership/signup.php?source=blah". that works great when the field is displayed on the signup form. but if i set the field to not display (in the add field section) then the field value doesn't get saved. any idea how to workaround this?

    thanks!

    mkm
  4. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    add the following code to amember/templates/signup.html

    <input type=hidden name=your_var_name value="{$smarty.request.your_var_name}">

Share This Page