Tabular is a list-like field type for loose-schemaed tabular data, typically provided by a web service.

Three widget types

  • a source widget which retrieves and presents options (table rows) for user interaction (selection)
  • a target widget which loads and saves - and optionally displays - selected row(s)
  • a solitary widget which combines the source and target roles (but doesn't support display of selected row(s)

Field/widget groups

Source and target widgets work as a group - and there may be more than one source in a group.

Table - dropdown - autocomplete - dynamic table

A source widget may be layed out as a plain table, a HTML select-like or autocompleting dropdown, or a 'dynamic' (jQuery.dataTable aided) sortable and searchable table.

Loose-schemaed entity kinds

Tabular data types are defined as entity kinds, whose only real steadfast requirement is that a row must always contain a certain primary key.
The rationale for this is that real life data sources/services may offer similarly - but not identically - schemaed data. It is thus a pragmatic decision, not a projection of an ideal.

Static vs. searchable data providers

A data provider (a module + a PHP class) which implements an entity kind defines a set of view columns and button columns usable when presenting the data to the user. The data provider also defines a route to an AJAX endpoint, which a source widget may call to retrieve data.
Some data providers are expensive to call; they may be querying data from legacy systems.
Other providers are more light and nimble, allowing for realtime searches via an autocomplete text field+a dropdown table.

Single-/multi-valued is (almost) all the same

Data is transported and stored as JSON-encoded lists of rows. Storagewise it makes no difference whether an instance contains one or more rows. And Field API cardinality is therefore not relevant.
Instead the module uses 'mock' cardinality, to allow configuration of single-/multi-valued behaviour.

For D8?

Not yet. The module's been developed in a D7 context, and due to high complexity a D8 version is currently not in scope.

Sponsorship

Tabular version 7.x-1.0 was sponsored by Københavns Kommune, Koncernservice (Copenhagen Municipality, Corporate Services).

Dependencies

Project information

Releases