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

Working with custom fields

Discussion in 'XenForo Development Discussions' started by JRW-910, Jan 17, 2012.

  1. JRW-910

    JRW-910 Member

    Hopefully this is the correct place for this.

    I am trying to work with custom fields.

    Lets say a create a new custom field (Field ID = car) that I call (Title = Type of Car). I use radio buttons with the following two options "value = toyota, text = Toyota" and "value = gm, text = General Motors".

    I can grab the Title with: {xen:helper userFieldTitle, car}.

    Then I can grab the the value for the current user with: {$user.customFields.car}

    How can I go about grabbing the Field ID and Text associated with the value?

    Thanks,

    -JRW
     
  2. JRW-910

    JRW-910 Member

    Ok, I got it. Lots of searching plus some trial and error.

    You can use this:

    {xen:helper userFieldValue, $userFieldsInfo.my_identifier, $user, {$user.customFields.my_identifier}}

    Thanks,

    -JRW
     
  3. JRW-910

    JRW-910 Member

    Is there any way to get this to work on the member list? The way its outlined above is not working.

    Thanks again,

    -JRW
     

Share This Page