Last modified: Sep 24, 2024

Configuration options for subform layout

Options for subform layout configuration

This documentation is a work in progess. Subforms are currently in preview-release.

Parameters

ParameterTypeRequiredDescription
idstringYesUnique ID, same as ID on other components. Must be unique in the layout file, and should be unique across pages.
typestringYesMust be ‘Subform’
layoutSetstringYesThe layout set to load for this subform, must be unique IDs within layout-sets.json.
tableColumnsarrayYesArray of objects containing column definitions for the subform table. Each entry provides a header, cell query and cell default value.
showAddButtonboolNoAllow users to add subforms. Defaults to true.
showDeleteButtonboolNoAllow users to delete subforms. Defaults to true.
textResourceBindingsobjectNoObject describing text resource bindings for the subform component.

textResourceBindings

The following keys in the textResourceBindings object are available for customization:

  • title - The title of the subform component.
  • description - The description text shown underneath the title.
  • addButton - The text for the add-button.

tableColumns

The tableColumns entry contains a list of objects that define the columns of the subform table.

Each entry must contain a headerContent and cellContent definition. cellContent is in turn also an object, which must include a query parameter alongside an optional default parameter.

The query value is a lookup path for the subform’s data model.

Eg. propertyName or propertyName.nestedProperty

"tableColumns": [
  {
    "headerContent": "Name",
    "cellContent": {
      "query": "name"
    }
  },
  {
    "headerContent": "Age",
    "cellContent": {
      "query": "age",
      "default": "[Unknown age]"
    }
  },
]