A CCK fieldgroup whose only child element is a computed field will be displayed in node edit forms. It shows up as an empty field. Normally CCK fieldgroups which contain only inaccessible child elements are not displayed.
I gather that this is because the computed field 'widget' is effectively a no-op, but there's no other property set to indicate that the computed field should not be displayed in the edit form.
Setting #access => false for the computed field(s) in question seems to prevent them from being displayed; I'm not sure if this will cause other problems.
This is related to the CCK issue #159099: Empty field handling
Comments
Comment #1
Moonshine commentedWell denying #access would likely cause some trouble in other areas, but if that's running well for you stick with it. :) I guess I can't really see where a computed field (which isn't entered via a form) would need to be in a Fieldgroup though. If you are just wanting the display output to be wrapped in theme_fieldset() then that would probably be easier to attack from the theme side of things.
Comment #2
intuited commentedIt's been a while, but IIRC I wanted to be able to be able to use the expand/hide JS action for a lengthy computed field, some kind of customized preview box. You might be right about the theming approach being more appropriate.
#349548: Conditional result for hook_content_is_empty() seems to be related. I've not been working on Drupal stuff at all lately, so I'm not really set up to test this and see if there's still a problem.
Comment #3
Moonshine commentedInteresting, thanks. I'll take a peek.
Comment #4
mmjvb commented