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

Custom user fields Permissionable?

Discussion in 'General XenForo Discussion and Feedback' started by Ladegro, Jul 31, 2012.

  1. Ladegro

    Ladegro Member

    What I want is to use the custom user field option to create a new field (Home Address) where members of our partly private forum can fill in their contact information for other private members.

    Part of the forum is public, with partly public members. So two questions arise;

    - is it possible to have certain custom user fields only available for certain user groups?
    - is it possible to hide certain custom user fields for anyone not part of a certain user group?

    I can imagine this needs to be done with an addon....but I was wondering it it'd be possible / hard to do at all?
     
  2. Ladegro

    Ladegro Member

    should I move this to another topic maybe?
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    This is possible with template edits, I believe.

    Something like:

    <xen:if is="{xen:helper ismemberof, $visitor, 11}">User Field: {$user.customFields.fieldId}</xen:if>

    So you'd pop that code wherever you would want the data to be displayed. Therefore it would only show to certain user groups.

    Where 11 is the user group ID and fieldId is the field ID of the custom field.

    Stopping it from being input is a little more tricky.
     
  4. Ladegro

    Ladegro Member

    great, I can work with that. Thanks.
     

Share This Page