Skip to content
Strife Docs

Reference Fields

Table Input~

The Table Input field enables users to input data in a tabular format, storing it as an array of objects in the database.

Strife Studio screenshot of an Table Input field

Warning:

The tilde (~) denotes that the field is available in developer preview only.

Settings

In addition to the basic settings, this section provides information about unique settings and configurations specific to this field.

Note:

You can find a comprehensive list of all basic settings in the 'Overview' section.

OptionDescription
Headers
A JSON array of strings specifying the column headers. E.g ["Name","Latin","Habitat","Feature"]
Input types
Specifies the input types for each header using a JSON array of strings. Supported types include 'text', 'number', 'date', 'datetime-local', 'email', 'month', 'tel', 'time', 'url', 'boolean', and 'multistring'. E.g. ["text","text","text","text"]
Options
A JSON object containing the options for every 'multistring' input type. Use camel case header as property name. E.g. {"columnHeader": []}
Sortable
Enables sorting in the Table Input field, which allows users to click on column headers for sorting.
Sort by
Specifies the default sorting column header.
Sort direction
Specifies the default sorting direction.
Searchable
Enables search for large data sets.
Display row numbers
If enabled, row numbers will be displayed in the Table Input field.
Exportable
If enabled, the table can be exporterd/imported to/from CSV
Export delimiter
Choose a delimiter for the export; file formats (CSV, TSV, TXT)

Define with JSON

When defining templates using JSON, this field is represented using:

  • Component Name: str-table-input
  • Type: table-input
  • Reference ID: str-table-input

The settings above map into the editor.attributes object inside the JSON definition.

JSON
{
  ...
  "editor": {
    "name": "str-table-input",
    "type": "table-input",
    "propertyName": "...",
    "attributes": {
      "sortable": true,
      "sortBy": "...",
      "sortDirection": "asc",
      "searchable": false,
      "rowNumbers": false,
      "exportable": false,
      "exportDelimiter": "..."  //','|'\t'|';'|'|'
    },
    "options": {
      "headers": "...",
      "inputTypes": "...",
      "options": "...",
    }
  },
  ...
}

Live preview

Note:

This field does not have any default Strife Web Components. Custom live preview implementations are fully supported.

Note:

For more information on live preview and Strife Web Components, please refer to the Live preview documentation.