Is there a way to hide a fieldset for a role if all the fields within that fieldset are hidden for that role? It may seem trivial, but when users are viewing or editing a node and an empty fieldset is visable, it is rather confusing. Where would I look for this in the code and does it refer more to CCK then to worflow_fields? Thanks
Comments
Comment #1
infojunkieThanks for your suggestion.
If you want to take a look at the code yourself, the function workflow_fields_node_form_alter() is the one in charge of showing the node form with the altered fields, and workflow_fields_nodeapi() handles the node view page.
Comment #2
mshaver commentedThis actually already works for the node display, as the "fieldgroup.module" weight is set to 9, after the "workflow_fields.module" is called and has the hook _nodeapi() that hides the group if the fields are empty or not accessible?
Where it doesn't work is on node edit, the group is still visible if all fields are not accessible within the group for that role. The fieldgroup_form_alter() seems like it would take care of this as well, but it doesn't for some reason?
Comment #3
infojunkieI confirmed that this is indeed a bug when fields are inside a fieldset. The fields are not found by workflow_fields which removes them from the database, thinking they've been deleted from the content type.
Comment #4
deekayen commentedAlso related if not duplicate: http://drupal.org/node/159099
Comment #5
deekayen commentedThere might be an answer to this in 6.x: http://drupal.org/node/277101
Comment #6
nath commentedAny solution for the 5.x version?
Comment #7
infojunkieThat's not high on my priority list, especially that D6 is maturing. You're welcome to submit a patch :-)I'll check whether this bug also affects D6 since I'm not sure it is just a problem of rendering or a deeper one.
Comment #8
adnansyed commentedI also want to remove an empty Group fieldset box at the bottom of my registration form even though I have selected all groups to be private and made sure that the option "display on registration form" is unchecked.
Does anybody know how to fix this?
Comment #9
infojunkieThis should be fixed in D6. Closing this unless someone still needs it on D5.
Comment #10
sopia commentedI'm having this problem too. Did you ever figure out how to get rid of the empty "Groups" fieldset?
Thanks for any help.