XF 1.3 Create a Notice with Criteria (Empty Custom field)

Clovis

Member
Hey Guys!

I'm trying to setup a notice that is only visible to players who have one of their Custom Fields blank (empty).

Is there any way to set the criteria if a field is empty? I've only been able to make it show up for those who had an entry in the custom field but not those who's field was empty.

Thanks!
Clovis
 
You could just use some HTML/CSS to build a notice with a conditional to show to the right users.

I added the below to the ad_above_top_breadcrumb template.

You would want to replace the user field ID with your own (portion in red).

Rich (BB code):
<xen:if is="!{$visitor.customFields.customField1}">
<div class="importantMessage">
<p>Hi, I'm a notice!</p>
</div>
</xen:if>

Results in:

upload_2016-2-21_15-50-58.webp
 
You could just use some HTML/CSS to build a notice with a conditional to show to the right users...

Rich (BB code):
<xen:if is="!{$visitor.customFields.customField1}">
<div class="importantMessage">
<p>Hi, I'm a notice!</p>
</div>
</xen:if>

Using '$visitor' causes the notice to show up for visitors.(i.e. anyone not logged in)

If I only want the notice displayed to members (who have a specific BLANK Custom User Field), once they are logged-in, what other variable could I use?

I tried using '$member' to no avail. :confused:
 
Last edited:
Back
Top Bottom