The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|