Consider the following example:

+ vtab group
  + vtab1
    + field1-1
    + field1-2
  + vtab2
    + feild2-1
  + vtab3
    + feild3-1

If one wants to move the fields back out of the vtabs, they have to go through 4 steps to delete the 3 vtabs and their vtab group. That's 8 clicks and page loads if you count the deletion confirmation page for each group. You can imagine how the number of clicks would increase as the complexity and number of groups grows.

How about if we had checkboxes next to each group allowing people to mass-select groups for deletion? I don't know if we could utilize the Views Bulk Operations mechanism for that.

Alternatively, we could have it so that if the top-level of a series of nested groups is deleted and that contains no fields, then a "Also delete nested empty field groups" option could be offered in the deletion confirmation page. This would allow the procedure of deleting the field groups in the above example to be a 3-step, 2 page refresh process:

1. The user drags the fields out of their groups:

+ field1-1
+ field1-2
+ feild2-1
+ feild3-1
+ vtab group
  + vtab1
  + vtab2
  + vtab3

2. ...then hits the "delete" action link of the vtab group.
3. ..in the deletion confirmation page, they are offered to also delete nested empty groups. So, vtab1, vtab2 & vtab3 are deleted in one go along with their parent vtab group. That's it!

This would also help in such cases when the user simply wants to move all fields to a single group and remove the rest. Consider the same example as above, but with nested fieldsets instead of tabs this time:

1. The user drags the fields in the fieldset they wish to keep:

+ parent fieldset
  + field1-1
  + field1-2
  + feild2-1
  + feild3-1
  + fieldset1
  + fieldset2
  + fieldset3

2. ...then hits the "delete" action link of the parent fieldset.
3. ..in the deletion confirmation page, they are offered the option to delete all nested empty groups (only fieldsets 1, 2 & 3), leaving all fields in the parent fieldset that now becomes the only fieldset containing the fields.

Comments

klonos’s picture

...a simpler solution would be to provide a "Pending deletion" field region where users could drag field groups (or fields for that matter) and they would be mass-deleted on form save - with confirmation of course. But I think that this might be better filed as a feature request in the core field_ui module(?).

Field API bulk data deletion:

Field API provides functions for deleting data attached to individual entities as well as deleting entire fields or field instances in a single operation.

nils.destoop’s picture

Status: Active » Closed (works as designed)

Yeah, i think this should be a feature request for field ui. We won't do this for fieldgroup only.