1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Editing Templates re: Custom User Fields - No display on Roster

Discussion in 'XenForo Development Discussions' started by Drshock, Apr 16, 2012.

  1. Drshock

    Drshock Member

    Good afternoon,

    I've got a member roster, as seen below.
    0.png
    We fudged having each players division show up in the roster by hijacking another field. This got us by, but now we want to fix it. We want the persons division to show up next to "Division New." In the example above, it should say Division New: Battlefield next to Dr Shock. Here's what we've done.

    1. Created a custom user field
    1.png
    4.png
    3.png

    2. Editing the member roster template so that division shows up.
    2.png

    Problem is that the division new field appears but the corresponding data does not. We're not sure what we're doing wrong here, so any advise/suggestions/help would be really appreciated.

    Thanks,
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. Drshock

    Drshock Member

    Hey Jake - thanks for your help. That sounds like it would/should work, but it did not work right. I edited the Member.php document and now in the roster next to Division New under my name only I see a 1. Any suggestions? I'll keep poking around and see if I can get something.

    Edit:

    Got it with an above post:
    {xen:helper userFieldValue, $userFieldsInfo.my_identifier, $user, {$user.customFields.my_identifier}}

    THANKS!! :D
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That works.

    I am guessing it's a multiple-selection field? Where users can choose more than one option at the same time?
     
  5. Drshock

    Drshock Member

    Hey again,

    No it was a drop down box. I'm not sure how or why it worked but it did so I'm a happy camper! :) Thanks for all of your help!
     

Share This Page