Add support for conditionally displaying field section header

Would like to see support added for conditionally “showing header” on Field Sections.  This would be similar to the SFDC feature where a section header can be displayed on “View” but not on “Edit/New”.

Thank you!

You can hack this by adding an conditionally rendered empty section.

Thanks Pat.  There are some drawbacks with the hack though:

1) If the section needs to be collapsible (which in my case it does), the conditionally rendered empty section won’t be able to control the “real” section

2) If you have sections side-by-side the vertical alignment will need some tweaking

The only viable workaround I can think of right now is to have two sections configured identically, one with “show header” enabled and one with “show header” configured to collapsible.  This works but is far less than ideal due to the number of fields I have in the section and the duplication required.

Maybe I’m misunderstanding your idea?

Yup. Wanting the section collapsible complicates it.

As for the vertical alignment, you could assign css to the section(s) to manage the CSS.

All this to say yes you are correct in that this is less than ideal.

lol  Yeah, CSS would solve for the alignment for sure.  Collapsible is the death nail though unfortunately :frowning:

Thought of another idea along these same lines…

In addition to conditionally “showing header”, would be nice to be able to conditionally specify the collapsible setting when “show header” is true.  For example, in the case of an existing record, you might want to show collapsed initially but for a new record, you might want to show open because input is required.

I’ve written a collapsible wrapper custom component to solve for these uses cases.  Would still like to see this functionality added to native functionality but in the meantime, see…. for more information.