Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  Add ReplyNew TopicNew Poll

 empty custom field link color
some of my custom fields are links to development/shippers/etc and i was wondering how to change the color of the icon (link) if a custom field is empty? specific to nine fields wrapped in the same div. i was using this but it's obviously not working:


any help would be much appreciated!

This post has been edited by coop: Nov 14 2017, 05:44 PM
No need to use JS here. Just add the profile field include tag to the element as a secondary class (with a prefix), and set the CSS for the class without the tag.

<div class="minipro-dvmt isEmpty<% FIELD_1 %>"></div>

.isEmpty { color: #f1f1f1 }

I think the profile fields dump no content if they're not filled, so if they aren't filled, the classname will be .isEmpty, but if they are filled, it'll be .isEmpty{field1 data} and the default color won't apply. Granted, someone could break that by leaving a whitespace at the front of the entry, but that's a quick fix with a stern warning.
that's good to know! though the class is a container for all nine divs that are in a table rather than every single field, so it's more like this:

<div class='minipro-dvmt'>
<td><div style='margin-top: -3px;'><a href='<!-- |field_14| -->'><span class='ion-ios-laptop'></span></a></div></td>
<td><div style='margin-top: -2px;'><a href='<!-- |field_14| -->'><span class='ion-ios-pulse'></span></a></div></td>

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options Add ReplyNew TopicNew Poll