Docs /Tab-EE

Overview

Tabs for the fields inside a repeating block, and for the fields in a field group.

EE's Publish Layouts can tab the entry form, but nothing can tab the fields inside a Grid row, a Bloqs block, a Fluid item or a Pro Variables group — and grouping a field group's fields means a layout per channel. Tab-EE adds a tab strip where you put it, and hides the fields belonging to the other tabs.

Every field belongs to exactly one tab. Nothing here touches values: hiding is display only, so every input stays in the DOM and still submits — switching tabs can never cost someone data.

Requirements

  • ExpressionEngine 7.x
  • For Grid columns: any Grid layout (see below) — including Pro Variables grids
  • For Pro Variables: Tab-EE enabled under its Settings → Variable types

Install

  1. Copy system/user/addons/tab_ee/ into the site's add-on directory.
  2. Copy themes/user/tab_ee/ into the site's user theme directory.
  3. Install "Tab-EE" from Add-Ons.

There is no control panel section — Tab-EE is configured entirely on the field.

Using it

Add a Tab-EE field where the tabs should appear. Its settings name the tabs and choose which of the neighbouring fields belongs to each. It works in five places:

Where What it tabs Strip appears
A field group the group's other fields where you placed the field
A Grid column that Grid's other columns each row's title bar
A Bloqs atom that block's other atoms each block's header
A Fluid field-group item that group's fields, in that item the item's title bar
A Pro Variables variable that group's other variables where the variable sits

Pro Variables grids are ExpressionEngine's own Grid under a different content type, so a Tab-EE column inside one tabs that grid's columns per row, exactly as in a channel Grid — and can sit in a group that a Tab-EE variable is tabbing at the same time.

Pro Variables ships with only Textarea enabled. Tab-EE will not appear as a variable type until it is ticked under Pro Variables' own Settings → Variable types.

In a repeating container each row, block or item keeps its own tab, so one row can show Content while the next shows Metadata.

A title bar colour. Each Tab-EE instance can tint the bar its tabs sit on — a Grid row, a Bloqs block, a Fluid item or a field-group panel. Leave it empty for the default. The active tab keeps the body's colour rather than the tint, which is what makes it read as joined to the content below, and the label colour follows the tint so a dark choice gets light labels.

In a field group the tabs draw a panel around the fields they govern, with the field's own label as its caption and its caret collapsing the whole box. A Panel title setting overrides that caption. Where the governed fields are not next to each other — a channel's non-group fields can interleave — the panel segments rather than enclosing something that is not on the tab.

The default tab. Fields you do not put on a tab go to a default tab, named "Content" unless you change it. It is derived, not stored: it appears only while something is in it and disappears once everything has been assigned, so a field added long after the tabs were set up always lands somewhere visible rather than nowhere.

Reusing tabs. A Tab-EE field can take its tabs from another instead of defining its own. It is a live reference: rename a tab on the source and every field using it follows. Set a field to Definition only to make it a source that never renders a strip. Which fields sit on which tab is always local and never inherited — field ids mean nothing in another group. A reference may only be one level deep, and a reference to a field that no longer exists resolves to no tabs, leaving everything visible rather than hiding anything.

One per container. Only one Tab-EE field governs a group, Grid, block or item. The settings screen names the existing one if you add a second, and the second stands down rather than fighting.

A Grid or Bloqs column has no id until it has been saved, so add and save new ones first, then assign them to tabs.

Grid layouts

  • Vertical — each row gets its own strip in its title bar and remembers its own tab.
  • Horizontal — one tab choice for the whole Grid, from an icon at the right end of the header row. A horizontal Grid is a real table with one shared header, so per-row tabs would leave cells under the wrong headings; hiding a column's header and its cells together keeps everything lined up. It starts on All fields, so adding Tab-EE to a populated Grid changes nothing until somebody picks a tab.
  • Auto (Grid's default) — a table while it fits, stacked rows once it does not. One tab choice for the whole Grid, shown as the header menu while it is a table and as a strip in every row's title bar once it stacks; picking a tab in any row moves them all. Starts on All fields.

Layout

addon.setup.php          registers the fieldtype
ft.tab_ee.php            settings, and the strip on the publish form
mod.tab_ee.php           no front-end tags; exists because EE decides an add-on has a module
                         purely from the presence of this file, and without it upd::install()
                         never runs
upd.tab_ee.php           registers the fieldtype
themes/tab_ee/           authored CSS/JS — the source of truth
sync-assets.sh           copies themes/tab_ee/ out to themes/user/tab_ee/
build-release.sh         cuts a release zip from HEAD

Notes for maintainers

  • A fieldtype owns its settings form. That is why configuration lives there: EE offers no render hook on the field-group screen, no update event on ChannelField and no insert event on ChannelFieldGroup.
  • Grid and Bloqs dispatch grid_-prefixed methods (Grid_parser::call, Bloqs\Controller\FieldTypeWrapper). In those contexts settings arrive in $data, not POST.
  • Bloqs needs blocks/1 and bloqs/1 in accepts_content_type. Accepting grid alone puts a fieldtype in compatibility mode, where Bloqs then requires it on a curated allowlist and otherwise reports "Missing definition" on the publish form. Bloqs probes with a random blocks/<rand> token, so the list must stay exact.
  • Fluid changes nothing about a child field's content type, so a Tab-EE field there still reports channel. Only the runtime differs: Fluid wraps fields in div.fluid__item-field with no id attribute, so a field is found through an input name (...[field_id_13]).
  • Pro Variables opts fieldtypes in BY METHOD NAME, not by content type. Pro_variables_types::_check_compatibility() looks for var_display_field (or the legacy display_var_field); its accepts_content_type('pro_variables') branch is commented out in shipped code. Adding pro_variables to CONTENT_TYPES alone does nothing — the type never appears. Declare the method, and the content type then routes everything else to the ordinary methods via type.pro_variables.php::get_bridge_method().
  • Pro Variables keeps a variable's name and site on exp_global_variables, which exp_pro_variables inner-joins on a shared variable_id. Selecting variable_name or site_id from exp_pro_variables is an SQL error, not an empty result.
  • Inside a Grid, content_type() is always the literal string grid — whichever host the Grid belongs to. The type its COLUMNS are stored under is separate: grid_content_type in settings, 'channel' or 'pro_variables'. exp_grid_columns is shared site-wide and its ids restart per type, so every column query needs both field_id and that content type, or a Pro Variables grid and a channel Grid with the same id hand each other's columns back.
  • Pro Variables' group screen keys its fieldsets data-id, not data-field_id — and its SIDEBAR uses bare data-id too, so a lookup must require data-type alongside it or it hides a navigation item instead of a variable.
  • Three clone templates to avoid mounting into: Fluid's .fluid-field-templates, Grid's .grid-blank-row, and Bloqs' hidden block (no data-id). A strip built in one is cloned as markup, so the tabs appear and even filter correctly, but cloneNode carries no listeners.
  • exp_fieldtypes.settings is a base64Serialized typed column. Store a plain array; an already-encoded string is serialized twice and fatals every field settings screen in the CP.
  • Absent is not empty. A field can be saved from a form that never rendered these controls, so save_settings preserves what is stored when its inputs are missing.
  • Never re-derive a tab handle from its name outside the parser. Renaming a tab keeps its handle, so regenerating one produces a handle nothing is assigned to and silently drops assignments.
  • Measure against something the strip does not size. Fitting against the strip's own container makes showing the tabs widen it, which makes them fit, which fires the observer — a visible flicker.
  • Find host controls by position, not class. Bloqs' title-row control set varies; a hardcoded list missed the enable toggle, then expand/collapse, then the context menu.
  • data-column-id, data-field_id, .blocksft-atom and Grid.bind are public-but-uncontractual surface. Stable today; a host's markup change could break that adapter.