• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

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