cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide set with no content

katarinahallber
Champ in-the-making
Champ in-the-making
Hi,
Im using Alfresco 4.0.e, Share.

I have added a panel-bordered set in my share form configuration. The fields belonging to the set are for properties in an aspect.

The set renders just fine when the document has the aspect, there is a panel with the set label and a border surrounding the fields.

My problem is when the document does not have the aspect and therefor the fields for those properties are not rendered - then the panel with the label and the border (with no content) are rendered anyway. Is there a way to prevent this? I guess I can write my own set-template with a check if the fields are present in the form and only render the panel and the border in that case? But is there an easier and more correct way to solve it?


Regards
Katarina Hallberg
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

unfortunately, no. We have written an adapted form template as well as custom set templates that cover this in our projects. The only other way we have found we can achieve this is by adding a form.get.js controller to the Alfresco Web Script which post-processes the form model to eliminate all those fields / sets before it is passed to the FTL.

Regards
Axel