Native Table View checkmark and X indicators

Use full arrays for native read-only boolean indicators, with the real Products InStock example.

Use the native status field for a read-only boolean, independently of an editable switch.

Arrays are the newer full, extensible configuration and are preferred for new definitions. Strings remain compatible legacy shorthand/quick syntax. Option keys are specific to each native field type.

$td_titles = ['NAME', 'ENABLED'];
$td_fields = [
    ['type' => 'text', 'col' => 'NAME', 'options' => []],
    ['type' => 'status', 'col' => 'ENABLED', 'options' => []]
];

The query must select the actual columns/aliases and a stable row key. Canonical numeric/string 0 displays the native red X; 1 displays the green check. The boolean branch uses options as an empty array. Native icons are centered at 21px. Empty/NULL/false and strings false/null follow the false branch; other nonempty words can be truthy, so use a real boolean result.

Real Products example

The Products InStock column selects the inverted expression:

if(sold_out,'0','1') as sold_out
array_push($td_fields, [
    'type' => 'status', 'col' => 'sold_out', 'options' => []
]);

Thus 1 means in stock/green, and 0 means sold out/red. The selected alias value determines the icon. String status:COLUMN remains supported legacy shorthand; full arrays are preferred for new definitions. V is sufficient to display the indicator; W/L are not needed just for an icon.

Nonempty choices use their owning field API

Do not invent a generic status value/label mapping. For a native editable choice list, the Table View LIVE select supports explicit name/value records:

$td_fields = [];
array_push($td_fields, [
    'type' => 'live',
    'inputType' => 'select',
    'col' => 'STATUS',
    'options' => [
        ['name' => 'Draft', 'value' => 'draft'],
        ['name' => 'Ready', 'value' => 'ready']
    ],
    'showAllTxt' => 'Select a status'
]);

On an authorized VL Table View, select the actual row key and STATUS in the owning query. Each name is the displayed label and value is the stored value. The current value is preselected. If none matches, an empty selected choice is inserted; showAllTxt defaults to Select an option. This example creates no database columns and grants no write permission. Validate allowed values in the owning save handler.