Hide Components when there are no Records

Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add…

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

Screenshot for “Hide Components when there are no Records”

You can add a little JavaScript to a page that will hide a Data Component if there are no records to display.

One Easy Step

Add the following code to the JavaScript tab of your page.

Text
TB.render('component_3', function(data) {   
    if (data.records === undefined || data.records.length === 0) {
    data.ele.css('display','none')
    }
});
Screenshot for “Hide Components when there are no Records”

Original Community Post:

Hide components when there are no records - Community Discussions / Tips and Tricks - Tadabase Community

Was this page helpful?

Something wrong or missing on this page? Tell us.