Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Highlighting rows in the DOM?

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 524 Views
  • banal
    Avatar
    Community Member
    901 Posts

    Highlighting rows in the DOM? Link to this post

    Hello all

    I was wondering if there's a way to highlight rows in the DOM, given some criteria.
    Example:
    I have a DataObject which may only have a limited amount of text. I'd like to highlight DataObjects that have too much text in the DOM. Something like:
    Text is short enough => Row has a green background.
    Text is between short and too long => Row has an orange background.
    Text is too long => Row has a red background.

    I know, this whole case could be avoided by limiting the text-input to a given amount of characters, but my use-case is slightly more complicated

    Any hints/pointers are most welcome.

    Edit: Formatting

    524 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.