Because the TABs feature is one of the most important phpMyEdit features, it deserves its own documentation section.
Tabbed groups of fields appear in specific page modes: Add, Change, coPy, View, or Delete. In List mode, when TAB settings are combined with Display options, users can suppress the display of fields below the first TAB group.
This feature is for tables, which have more than a few fields. It enables you
to group fields together into groups. Every group of fields then becomes
accessible via TAB on the top or the bottom of the page, what is based on the
['navigation']
settings. TAB has its own label, which can
describe fields in a particular group.
TAB is defined in the first field of group. Every following field will belong to the same group under the same TAB untill the next TAB is defined. The first field must have its own TAB definition. If this definition is omitted, fields will belong to first default group and this group will be a permanent tab that will be always visible.
TAB definition is very simple. Just define the label on the TAB (1st field, 5th field, 10th field, and so on).
There is also possibility to define the default TAB. In this case, the array style initialization is required.
Example 4-40. Default TAB definition
$opts['fdd']['col_name']['tab'] = array( 'name' => 'Personal data', 'default' => true );
In List mode, to initially display individual fields from only the first TAB group, apply Display options to all fields below the first TAB group, for example:
Example 4-41. Display options below the first TAB
$opts['fdd']['col_name']['options'] = 'AVCPD'; // or possibly 'AVCPDF'
For users with non-compliant JavaScript browsers, you can turn TABs feature
off. The general control is achieved via
$opts['display']['tabs']
variable. If not specified, its
value is considered as true
. Variable
$opts['display']
is described in Special page elements
sebsection.