Style background-color won't apply on list when field is empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017 08:00 AM
I've created some style entries for a field. One is set to true based on a condition of another field and these styles get applied correctly on the form view.
On the list view, if the field is empty, the style is not applied.If I view the form, it is applied.
Field: blank
Style not applied in list view (background-color)
Style applied in form view
Field: value
Style applied in list view
Style applied in form view
I really want these fields to appear greyed out on the list view. Just a side note that they are also restricted by an ACL for write access but only show as greyed out by the default style (being read only) on the form view.
The issue is that I WANT the field to be blank AND greyed out in the list view when it is read-only.
- 2,508 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017 10:00 AM
It's likely to be a different CSS class when in the list.
I don't know the underlying class names, but as a list the values are presented in tabular format, rather than as form fields, hence your style won't apply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017 10:04 AM
It definitely has something applying differently but not sure where. And the style gets formatted IF I put some kind of value in that field. It's not consistent between the two views. I'm wondering if anyone has developed a work around or where I can maybe override the css?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017 10:17 AM
Can you post the screenshot of your condition ? I will try in my sandbox.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017 10:23 AM
Simply put in a condition like this:
Table: < any table>
Field: <text field or number field>
Value: javascript: true;
Style: text-align:center;
background-color:grey;
Now view the list with empty and non-empty values. You'll see that the fields with a value show your formatting while the others don't.