You are viewing limited content. For full access, please sign in.

Question

Question

Highlight a Cell in a Collection/Table with Page Breaks

asked on May 7, 2019 Show version history

I have set a CSS to highlight in yellow. I applied it to the following. It works fine:

I then applied it to a field on the next page (which is a collection), but it's not working:

Do I have to do something special because there's a page break or the item is in a collection? Right now, for the highlight, this is what I have:

$(document).ready(function(){

//Change background color for css = highlight
  $('.highlightYellow').css('background','#ffff99');

});  //close document.ready

I will also need to highlight one cell in a table too. Because right now, it only highlights the cell in the first row:

0 0

Answer

SELECTED ANSWER
replied on May 7, 2019

Is there a reason you're using javascript to apply the style rather than a simple CSS?

Put this in the CSS section of the form:

.highlightYellow {background: #ffff99}

Then add the CSS tag "highlightYellow" to each field/table column under the Advanced tab of the properties that you want it to apply. 

1 0
replied on May 7, 2019

No particular reason for doing it that way other than that's what I learned somewhere on LF Answers. Obviously, the simple CSS solution is way better! Thank you.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.