Log in

View Full Version : Custom profile fields (hiding when empty)


MaTraX
01-03-2006, 08:25 AM
Hi
I would like to ask you is there a chandce to hide an empty custom profile field?
For example I have field with ID:field9 and I would like it to be hidden on the profile page if the user left this field empty.

I know that there is something like this:

<if condition="$show['profilepic']">
<tr>
<td class="alt1">
<div align="center"><img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]
</phrase>
" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
</div></td>
</tr>
</if>

and then the picture field is hidden if the user does`nt upload any pic. Is the same thing is possible with custom fields?

SHANE-D-PAIN
01-03-2006, 09:23 AM
<if condition="$userinfo['fieldx']">
$userinfo[fieldx]
</if>

That will make the profile field appear only if they have filled it in. :)


I have used this for loads of various parts of my profile page development: www.teenageforums.com/forums/Shane

MaTraX
01-03-2006, 10:46 AM
Thank you for help :)