The field storage settings form (defines custom database columns for this field)
The field settings form. Customize your FlexField items (sub-fields) here.
The widget settings on the Manage Form page. Display your FlexField items (sub-fields) inline using a css-flexbox-based layout
Multiple field formatters out of the box. Need more than this? Use the FlexField formatter and handle it at the theme layer
The final output of the widget on an entity form

This project is not covered by Drupal’s security advisory policy.

Defines a new "FlexField" field type that lets you create simple inline multiple-value fields without having to use entity references.

Features

  • Multiple-value fields without entity references
  • Inline field widgets (FlexField items) using a customizable css-flexbox-based layout system
  • Multiple field formatters: FlexField (custom theme hook), Inline, HTML List, Table, Custom Template (similar to views' field rewrite functionality)
  • Clone existing FlexField definitions
  • No Custom Code Required! (not that there's anything wrong with that)

Included FlexField widget types:

  • Textfield
  • Select
  • Radios
  • Checkbox
  • Integer
  • Decimal
  • Float
  • Uuid

Disclaimer

This module is for simple, multi-fields and is not meant to be a full-on replacement for using entity references. If you need a multi-field with nested multi-value fields, or uses a complex field type, you're still better off using something like Paragraphs to satisfy your needs.

For Developers

In a way all this module does is provide a UI for creating a FieldType plugin without having to write custom code. It's intended for one-off inline multi-fields that are meant to just capture some simple text-based data without all the overhead of separate entity bundles and entity references. It also simplifies theming since the sub-fields (FlexField items) are just columns on the database and are available without having to load a separate entity.

Extending FlexField

FlexField defines a new plugin which you can implement to define your own FlexField types. FlexFieldType plugins handle the rendering of the field input on the entity form, as well as the rendering of the stored values. Take a look at the "Select" type for a fairly thorough example of what you can do with it.

Project information

Releases