Add Custom Field to payments.html? Need help ASAP!

Discussion in 'Troubleshooting' started by zzargo, Apr 7, 2010.

  1. zzargo

    zzargo New Member

    Joined:
    May 7, 2008
    Messages:
    15
    Hi there!

    I'm trying to add the custom field "ctry" that is already added to Amember as a "common field" to be displayed on the payments.html page.

    This field is displayed on the user's account, but I can't seem to get it to display on the payments page.

    I have tried lots of variants of this and nothing seems to work. It just shows up as blank.

    What should I use here for this page to pull the custom field "ctry" and display it?

    Thanks for your help!! :)
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Use this code:
    Code:
    {php}global $db; $user = $db->get_user($this->_tpl_vars['p'][member_id]); print $user['data']['ctry'];{/php}
    
  3. zzargo

    zzargo New Member

    Joined:
    May 7, 2008
    Messages:
    15
    Thank you SO MUCH Alex!! Works perfectly :)

    I never would have guessed that code. :)

    Thanks!!

Share This Page