View Full Version : Use if condition - don't show if field is 'rather not say'?
criscokid
01-14-2007, 08:47 AM
In the memberinfo template I'm using the following to display the field if the profile field contains data:
if condition="$userinfo[fieldX]"
/if
What would my condition be if I also wanted to not have the field show if the content of the field is 'rather not say'?
Attilitus
01-14-2007, 08:51 AM
<else />
criscokid
01-14-2007, 04:05 PM
<else />
If the field contains data then show it, if it's blank or contains 'rather not say' then don't show.
I thought it would be a conditional that includes an 'OR'
Kirk Y
01-14-2007, 05:42 PM
It'd probably be simpler to just do this:
<if condition="$userinfo['fieldX'] AND $userinfo['fieldX'] != 'Rather Not Say'">
$userinfo['fieldX']
</if>
Make sure that 'Rather Not Say' is cased exactly as it is in the field.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.