Relation Flexifield Interface

Component ID

1716808

Component name

Relation Flexifield Interface

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body


Relation is awesome. Flexifield provided an awesome UI.
This module will attempt to make awesomesauce.

The lofty goal is to provide an adaptive form widget that allows users to select and reorder instances of different relation types side-by-side in the same field. While Relation Select allows you to choose from different bundles for the endpoints, you are constrained to having only one relation type - i.e. one set of fields describing the relationship - per form field.

Why? Think about adding attachments to an article: Wouldn't it be cool if we were able to make reference to documents, images, and links (each with different sets of metadata fields) but have them all appear in the same "attachment" section on my article form? Now what if we needed to set the caption of an image for this article but use a different caption somewhere else? By leveraging the relation module, we could create the same user experience regardless of whether the image is implemented as a custom node type or as a file entity with the media module.

Along the way, we plan to create:

  • a FAPI routine to return users to a snapshot of a parent form after collecting data from one or more child forms ("form interruption", aka "decoupling form API ajax for mobile-first experiences")
  • javascript to auto-populate a relation's metadata fields with values from a selected reference
  • a touch-friendly replacement to tabledrag.js that leverages build modes to display an overview of each row's content (like vertical tabs' summary information)
  • a weight column on the relation table?
  • an optional interface combining draggable tabs with a subform to add/edit relation references and their associated fields (perhaps switching responsively between 'static' two-column layout and accordian)

Note: this widget is not currently planned to function with relations having more than 2 arity. But, c'est la vie.