I am using SPJS on a form and have CSS for the banded rows.
tr.sbs_OuterTR:nth-child(even) {
background-color:#f2f2f2;}
tr.sbs_OuterTR:nth-child(odd) {
background-color:#ffffff;}
I also have some rules that hide rows where appropriate, but the blank banded rows still display. Is there any JS I can use for DispForm and EditForm to hide the blank banded rows?
If you use code to hide fields in a row with side-by-side fields there is unfortunately no built in functionality to hide the “outer” row when all fields in the row have been hidden by rules.
The only way to do this is to use custom js – for example on an interval – to check if all fields have been hidden and then hide the outer row.