If all the fields in a fieldset are hidden, then the fieldset itself should be hidden to rather than displaying an empty fieldset.

Would be nice to be able to select the entire Field Group. Right now have to choose each child field individually.

Comments

amogiz’s picture

Subscribe !

drupov’s picture

+1 for that too. It would be really important to see it work.

Thanks!

Edit: or is it a duplicate of https://drupal.org/node/1161314 ?

vlooivlerke’s picture

This is not a duplicate, the other issue is about fieldgroup and not fieldset

I want to hide an empty fieldset

chrislabeard’s picture

Issue summary:View changes

Anyone find a solution for this?

System Lord’s picture

I, too, would like to see this fixed.

GemQueen’s picture

Me too!

jacquelynfisher’s picture

Same here. Since fieldsets are now built into Drupal, it is important to be able to hide the fieldset, whether we make the fieldset itself conditional or if we hide the fieldset when "empty" (all fields within are conditionally hidden).

anrikun’s picture

Component:Compatibility w/ other modules» Javascript
Status:Active» Needs review
FileSize
583 bytes

Please try this patch that hides fieldsets unless one of their fields is visible.

Zekvyrin’s picture

Great! It works as expected for me.

Zekvyrin’s picture

Well, I guess I was too fast to answer..

This doesn't check recursively (for example it doesn't hide a group which has a "hidden" group which was hidden by this)

bobdekinder’s picture

Patch #8 works perfectly for me. https://www.drupal.org/node/1161314 would be a more cleaner solution, but for now this will do :)

wildfeed’s picture

Patch #8 is a BINGO. Spot on. Thank you anrikun!

tedstein’s picture

Patch works perfectly for the closest fieldset. However, if fieldsets are nested then the patch fails to reach the outer fieldsets.

This also breaks if there are nested fieldsets: The nested fieldsets do not reappear when the condition is triggered.