Is it possible to ignore any empty groups within a multigroup when submitting a node? There are a couple instances where this would be helpful:

1) If any field in a group is required, the node will not save until the empty group is removed. It would be more user-friendly to simply ignore the empty group.

2) If an empty group appears in the middle of two non-empty groups (for instance, if you move an empty group between two non-empty groups, or add two empty groups but only enter values for the bottommost one), then an empty row appears when you view the node. Again, it would be more user-friendly to just ignore that empty group.

Comments

Status:Active» Closed (won't fix)

"user friendly" here is ambiguous. Other users may need to just keep the empty subgroups, and coding this option doesn't worth IMO when it is as easy as using the 'remove' button of the subgroup.

No offense meant with the user friendly comment. But I feel strongly enough about this as an issue that I'd like to ask you to reconsider. Perhaps it could be done as an option, so the admin could decide whether to leave blank groups alone or eliminate them. That way, if you're in a situation where blank groups would be desirable, you can keep them, and if you want them eliminated, you could do that too.

I'd offer to code a patch, but I'm not quite advanced enough in my Drupal programming (yet!)

Actually I agree with seehawk here.

As we already debated in the 'remove button' issue ;-), I think "holes" are just not in the CCK model. Multigroups showed a need to leave holes in the values of an individual field when it's part of a multigroup, to keep deltas synchronized between fields of the group. But at the multigroup level, there shouldn't be holes.
It's not important to be at position 3 specifically if there's nothing at position 2, what is important is to come 2nd or 3rd.

Status:Closed (won't fix)» Active

hmm... ok.

This can be an option at the multigroup level. Not sure when I'll have the time though.

Anyone wishing to chime in with a patch is welcome.

Status:Active» Postponed

Assigned:Unassigned» markus_petrux
Status:Postponed» Active

I expect to spend some time here in the hope to get this done asap.

markus_petrux,

I'm trying to code a workaround to a very similar issue in Flexifield. In fact, some of the folks in that project claim that their issue is really caused by an issue in CCK. It might be related. Not sure if that will be helpful to you or not, but figured I'd give it a try.

In any case, thanks for working on this. If you finish before I find a solution for Flexifield, I'll be switching over to CCK 3 and Multigroup.

FYI, for my particular issues, see http://drupal.org/node/442834#comment-2246818 and http://drupal.org/node/551660#comment-2248640

Blessings,
Andrew

FYI, I have a solution form my particular issue. See http://drupal.org/node/442834#comment-2253380

This is definitely something I need to work with multigroup node submissions. Otherwise I am getting some strange default data that is saved with each node that is created or updated.

Status:Active» Postponed (maintainer needs more info)

@markus_petrux, is this still an issue? If so, what needs to be done?

Karen, it seems like this was resolved on my end. I'm not sure for all cases, but my empty groups no longer generate empty fields for a submitted node.

I having the same problem. I installed the last cck 3 dev version

Thanks in advanced

Xarbot

Assigned:markus_petrux» Unassigned

@KarenS: I have latest CCK3 installed and I've seen problems related to this issue (a multigroup with a freetagging field and another one which is number + optionwidgets). Though that project is on a dormant state, so I do not have time to work on this. This should change, but I'm still unsure when.

Status:Postponed (maintainer needs more info)» Fixed

I think I have this working.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.