how to hide custom user field on profile if none is set?

dark_night

Well-known member
Registered
Joined
Jul 28, 2020
Messages
149
Points
53

Reputation:

hey everyone. i am trying to figure out how to hide a custom user field on profile if a user hasn't set any value in the account settings. what would be the right if statement to hide a custom user field if its empty/blank in member_view?

thanks
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
370
Points
103

Reputation:

Give it a try

PHP:
<xf:if is="$user.Profile.custom_fields.yourcustomfieldname is not empty">

{$user.Profile.custom_fields.yourcustomfieldname}

</xf:if>
 
Top