ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

display custom member field for logged in member

January 21, 2011 3:24pm

Subscribe [2]
  • #1 / Jan 21, 2011 3:24pm

    Eastwood Design

    605 posts

    I need to display a custom member field for logged in member in one of my templates.

    This does not seem to work

    {exp:member:custom_profile_data}
    {Member_Custom_Field}
    {/exp:member:custom_profile_data}

    Actually it works in “some” cases
    It works in the template as is, but when I add it in a form it comes up blank

    <input type="hidden" name="item_id" value="{exp:member:custom_profile_data}{Member_Number}{/exp:member:custom_profile_data} ">

    is displayed

    <input type="hidden" name="item_id" value=" ">

    outside of the input it works fine. I checked and the same deal with {screen_name}, it works outside of a form but not within a form input tag

    here is my paypal form

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="[email protected]">
    <input type="hidden" name="amount" value="500">
    <input type="hidden" name="tax" value="0.00">
    <input type="hidden" name="item_name" value="Product Name">
    <input type="hidden" name="item_id" value="{exp:member:custom_profile_data}{Member_Number}{/exp:member:custom_profile_data}">
    <input type="hidden" name="return" value="http://www.website.com/index.php/site/deposit/">
    <input type="hidden" name="shipping" value="0.00">
    <input type="hidden" name="no_note" value="1">
    <input type="image" src="/images/button_500_deposit.png" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
          </form>
  • #2 / Jan 22, 2011 3:37pm

    Greg Salt

    3988 posts

    Hi Eastwood Design,

    I can’t replicate this issue on my local installation of version 2.1.3. Please confirm the version and build you are using. Also, is this form inside another tag?

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases