# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- a/field_group.module +++ b/field_group.module @@ -807,7 +807,19 @@ } } // Child is a field, the element is not empty. - elseif (!empty($element[$name])) { + else + { + // Checks if field's stripped HTML markup is empty (field group is empty only if it has really empty subgroups even though they are results from views fields etc.) + $markup_empty=FALSE; + if (isset($element[$name][0]["#markup"])) + { + // We will set an exception for and tags to preserve some content to be considered as empty + $markup_no_tags_trimmed=trim(strip_tags($element[$name][0]["#markup"], "")); + if (empty($markup_no_tags_trimmed)) + $markup_empty=TRUE; + } + + if ( (!empty($element[$name])) && (!$markup_empty) ) $empty_group = FALSE; }