Show element if not empty

jh

Member
Hi

I have some elements on details view set to hide if empty, using some jscript. This works perfectly.

However I have noticed it loads the elements labels before hiding them so I wondered if there was a way to prevent this from happening (for neatness sake only). I thought perhaps the element should be hidden and then some element jscript to 'show' the element if the value was not null/empty. But I cant seem to get anything to work.

If someone could kindly advise on the best procedure I would be very grateful.

Kind Regards
 
An empty element has the CSS class
fabrikDataEmpty
in its element container
so you can easily hide it by adding custom css
.fabrikDataEmpty {display:none;}
 
Hi

Sorry if I wasnt clear but I wanted to have the element set to show if it has a value only - that is, it is 'hidden' as standard and then only shows if the value is not null. This is because there is a slight overlap with the empty element label only hiding once the page has loaded.
Hope that makes sense.

Kind Regards
 
Yes. With the CSS I mentioned the element is hidden (display:none) if it's empty and shown if it has a value.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top