Skip to content

Field group functionality in core #647

@sirkitree

Description

@sirkitree

Update 2023:

It has been decided that the field group module provides more options for field groups than we wish to include/support in core, so rather than move the entire module into core, we are planning to revamp the fieldgroup API and move certain types of field groups into core (groupings that already exist in core) and to leave others for the contrib module. The new fieldgroup API will become part of core's field + field_ui modules.

Group types planed for core:

  • Fieldset
  • Details
  • Div
  • Vertical Tabs

Group types that should remain in contrib:

  • HTML element
  • HTML5
  • Horizontal tabs
  • Multipage
  • Accordion

The Field Group contrib module would simultaneously release a new minor version (that depends on this version of Backdrop core) where those group types are removed from the module, and all remaining types are updated to use the core field group API (which will be similar to what's there already). The current group API will also be removed from the contrib module.

Requirements for getting new fieldgroup contrib module in core:

  • Integrate Fieldgroup API into field/field_ui modules
  • Create group type for fieldset
  • Create group type for details
  • Create group type for div
  • Create group type for vertical tabs

Original Issue: It would be pretty outstanding if we have field_group in core so that forms could be arranged a lot nicer with things like vertical tabs and such through the UI.

Requirements for getting fieldgroup contrib module in core:

  • Place the module into the core/modules directory
  • Move theme functions into field_group.theme.inc file
  • Remove all the field group help text and fieldset
  • Field Group Configure and Delete operations should use dropbutton
  • Field Group Configure form should use menu callback (move from an expanding section to a new page -- same as field settings).
  • Remove the t() function from all tests
  • Move display tests into field_group.display.test
  • Standardize on Field group for the UI and documentation (as opposed to Fieldgroup in some places).
  • Adjust very long lines to be under the 80 character limit for coding standards
  • Move display suite code to ds module: see Add hook_theme_registry_alter to support field_group. backdrop-contrib/ds#11
  • Add description text for the div settings (what are "effect", and "speed"?)
  • Combine the options for html_element and html5 and provide an upgrade path
  • Replace the new stdClass(); in _field_group_get_html_classes().

User experience cleanup options:

  • N/A Remove the whole 'Fieldgroups' fieldset and help text (from previous iteration of module)
  • Remove the whole 'Fieldgroups' vertical tab (including the ability to clone from another display)

New features (options):

  • Make field group containers collapsible
  • Add a "clone" operation for a field group on the currently visible display
  • Instead of having a separate 'Add new group' row below 'Add new field', just have 'Group' as an option under 'Select a field type', and the different group types (e.g. fieldset, vertical tab, etc.) as 'Widgets'.
  • (is this a good idea?) remove the ability to change the group type from the overview page (why?)

Related issues:

Issue advocate: @jenlampton

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions