![]() |
Custom User Fields
I am trying to display custom user fields on the profile page using this script:
Code:
<vb:if condition="!empty($userInfo['customFields']['default']['field2_title'])"><div class="profile-info-item">{vb:phrase location}: {vb:raw userInfo.customFields.default.field2_title.val}</div></vb:if> However, when there is no value in the text box, it still displays "Location:" Is there a way to fix the code so that the title and information are only shown on the profile if there is a value in the text box? Thanks in advance! |
Why not just:
HTML Code:
<vb:if condition="$userInfo['field2']"><div class="profile-info-item">{vb:phrase location}: {vb:raw userInfo.customFields.default.field2_title.val}</div></vb:if> |
All times are GMT. The time now is 04:58 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|