Hide group if empty

droogers

Member
Hello,
In my list detail view I want to hide joined groups that are empty.
To do this I filled in "Hide if no suitable elements" in the tab layout on groups.
This doesn't have effect.
 
Thanks for your reaction.
Strange. The Group doesn't have an element that joined but it also isn't hide.
I can try with javascript but I don't now how to do this. Do you have an example ?
 
I made a javascript with the name details_30.js on components/com_fabrik/js with the code:
JavaScript:
window.addEvent('domready', function () {
   document.getElements('.repeatGroupTable .fabrikNotice').getParent('.fabrikGroup').hide();
});
where 30 is the ID number of the list.

Unfortunaly it doesn't work.
 
Id must be your form id, not list id.

But I don't understand what you are trying to do.

If the group doesn't have an element why do you display it at all? You can set it to be hidden in group settings or remove it from you form.
 
Thanks for your reaction.
I changed the name to form_30.js. The form is having the same ID number as the list. But this doen't help.
At some records it is joined wih a group and at other records it is not joined. When it is not joined I can see empty rows. I want them to be hidden.
You can see it in the attached files where 'Collecten' is the group that is joined in file detail_list_where_groups_are_joined. At the other file the group is not joined and so the rows are empty.
 

Attachments

  • detail_list_where_groups_are_joined.png
    detail_list_where_groups_are_joined.png
    17.3 KB · Views: 102
  • detail_list_where_groups_are_not_joined.png
    detail_list_where_groups_are_not_joined.png
    12 KB · Views: 103
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top