Appearance
Overview
This section is a reference guide for the upload form's metadata schema, which includes details of the form definition and form data structure.
Form Definition
The structure starts with three key top level attributes: config, actions, and nodes.
json
{
"config": {
"renameStrategy": "template",
"relabelStrategy": "template",
"renameTemplate": "{{collection_id}}_upload{{date:YYYYMMDD}}_{{random:8}}_file{{file_index}}",
"relabelTemplate": "{{collection_id}}_{{access_level.mode}}_upload{{date:YYYYMMDD}}_{{random:8}}",
"uploadPath": "{{item_id}}/{{label}}"
},
"actions": [
{
"type": "email",
"when": "afterSubmit",
"to": {
"source": "values",
"path": "notifications"
},
"bodyTemplate": "A new upload was submitted for {{collection_id}}."
}
],
"nodes": [
{
"type": "text",
"id": "comment",
"label": "Comment",
"path": "comment"
}
]
}config:optional form-level behavior such as upload naming, labeling, and upload path generationactions:optional actions executed after submitnodes:form structure
NOTE
version, title, and formKey exist in the internal form definition, but are added by the platform. Users editing the form definition field should only provide config, actions, and nodes.
Configuration (config)
Form configuration controls upload renaming, relabeling, and upload path behavior.
json
{
"config": {
"renameStrategy": "template",
"relabelStrategy": "template",
"renameTemplate": "{{collection_id}}_upload{{date:YYYYMMDD}}_{{random:8}}_file{{file_index}}",
"relabelTemplate": "{{collection_id}}_{{access_level.mode}}_upload{{date:YYYYMMDD}}_{{random:8}}",
"uploadPath": "{{item_id}}/{{label}}"
}
}renameStrategy:how uploaded file names are generatedrelabelStrategy:how uploaded file labels are generatedrenameTemplate:used when strategy is"template","prefix", or"suffix"relabelTemplate:used when strategy is"template","prefix", or"suffix"uploadPath:optional slash-delimited topic path created under the selected upload topic, for example{{item_id}}/{{label}}
Allowed strategies:
"none""input""suffix""prefix""template"
When uploadPath is omitted or empty, no relative topic path is generated. When provided, it is treated as a template and resolved per uploaded file. Missing topics are created automatically. In this context, {{name}} and {{label}} refer to the resolved upload name and label for the current file.
Field Nodes (nodes)
Currently supported DSL field types are:
texttextareanumberradiocheckboxdatasetPickermatrixrepeatselect
All field types share the following base properties:
json
{
"id": "comment",
"label": "Comment",
"path": "comment",
"helpText": "Optional note",
"editable": false,
"validation": {
"required": true
},
"retractable": false,
"defaultOpen": true,
"clears": ["other_field"]
}id:unique field identifierlabel:UI labelpath:storage path in form valueshelpText:optional helper texteditable:when set tofalse, this field is locked on the edit page but remains editable during upload/createvalidation:optional validation rulesretractable:collapsible field shelldefaultOpen:default open state when retractableclears:list of other value paths to clear when this field changes
Field Node Types (nodes[].type)
Text
Text input field.
json
{
"type": "text",
"id": "title",
"label": "Title",
"path": "title",
"placeholder": "Enter title",
"helpText": "A short descriptive title",
"validation": {
"maxLength": 255
}
}placeholder:optional input placeholder
Textarea
Text area input field.
json
{
"type": "textarea",
"id": "description",
"label": "Description",
"path": "description",
"placeholder": "Enter description",
"rows": 4,
"helpText": "Longer free-text description"
}rows:visible row count
Number
Number input field.
json
{
"type": "number",
"id": "temperature",
"label": "Temperature",
"path": "temperature",
"placeholder": "Enter temperature",
"min": 0,
"max": 500,
"step": 0.1,
"default": 25,
"helpText": "Temperature in °C"
}min,max,step:numeric input configurationdefault:default numeric value
Radio button
User selects one option.
json
{
"type": "radio",
"id": "access_level",
"label": "Access Level",
"path": "access_level.mode",
"helpText": "Choose one level or enter a custom value",
"default": "Internal",
"input": {
"modePath": "access_level.mode",
"valuePath": "access_level.custom"
},
"options": {
"source": "static",
"items": [
{ "label": "Public", "value": "public" },
{ "label": "Internal", "value": "internal" },
{ "label": "Restricted", "value": "restricted" },
{
"label": "Custom",
"kind": "input",
"value": "__custom__",
"placeholder": "Enter access level"
}
]
}
}options:option source configurationdefault:default selected valueinput.modePath:where the selected option is storedinput.valuePath:where the custom input value is stored
| User action | Stored values |
|---|---|
select Internal | access_level.mode = "internal" |
select custom + type partners-only | access_level.mode = "__custom__"access_level.custom = "partners-only" |
Checkbox
Boolean checkbox
User confirms / denies one option.
json
{
"type": "checkbox",
"id": "shared_with_lab",
"label": "Share with lab",
"path": "shared_with_lab",
"multiple": false,
"helpText": "Allow other lab members to access this upload"
}Multi checkbox
User selects many options.
json
{
"type": "checkbox",
"id": "notifications",
"label": "Notify recipients",
"path": "notifications",
"multiple": true,
"options": {
"source": "formDataRelation",
"from": {
"source": "formData",
"path": "collections",
"where": {
"collection_id": { "ref": "$root", "path": "collection_id" }
}
},
"follow": {
"idsPath": "related_collections",
"targetPath": "collections",
"targetKey": "collection_id"
},
"transform": {
"type": "zipArrays",
"arrays": {
"name": "recipient_names",
"email": "recipient_emails"
},
"copy": {
"collection_id": "collection_id"
}
},
"labelTemplate": "{{name}} ({{email}}) - {{collection_id}}",
"valueKey": "email",
"dedupeBy": "email"
},
"helpText": "Choose who should be notified"
}multiple:boolean vs multi-select modeoptions:option source configuration for multi-checkbox
Select
User selects from drop-down menu.
json
{
"type": "select",
"id": "collection_id",
"label": "Collection ID",
"path": "collection_id",
"helpText": "Select the collection used for this item",
"options": {
"source": "formData",
"path": "collections",
"labelKey": "collection_id",
"valueKey": "collection_id",
"searchKeys": ["name"]
},
"placeholder": "Choose a collection...",
"clearable": true,
"default": null,
"dropUp": false,
"deactivated": false,
"sort": "label-asc",
"labelKey": "collection_id",
"valueKey": "collection_id"
}placeholder:placeholder textclearable:whether users can clear the current selection (default:true)default:default selected valuedropUp:render menu upwarddeactivated:disable the fieldsort:optional option sorting mode for the autocomplete menulabelKey:optional label mappingvalueKey:optional value mapping
Select option search
By default, autocomplete search matches only the rendered option label.
To include additional fields in matching, define options.searchKeys as an array of key paths.
Example:
json
{
"type": "select",
"id": "item_id",
"path": "item_id",
"label": "Item ID",
"options": {
"source": "formData",
"path": "items",
"labelKey": "item_id",
"valueKey": "item_id",
"searchKeys": ["name", "partner"]
}
}NOTE
In this example, users can find an option by typing either the visible item_id label or values from name and partner.
Select clear behavior
When clearable is true, the component shows a clear action (x) after a selection is made.
- Clicking clear removes the current value and keeps focus in the input.
- If
clearableisfalse, the clear action is hidden and the selection cannot be cleared via the component UI.
Example:
json
{
"type": "select",
"id": "item_id",
"path": "item_id",
"label": "Item ID",
"clearable": false,
"options": {
"source": "formData",
"path": "items",
"labelKey": "item_id",
"valueKey": "item_id"
}
}Select option sorting
The sort property controls how options are ordered in the autocomplete dropdown.
Supported values:
"none": keep the original resolved option order (default)"label-asc": sort by display label ascending (A -> Z)"label-desc": sort by display label descending (Z -> A)"value-asc": sort by option value ascending"value-desc": sort by option value descending
Behavior details:
- Sorting is applied after options are resolved from the configured
optionssource. - Search/filtering runs on the sorted list.
- String comparison is case-insensitive and numeric-aware (
2sorts before10). label-*modes use the resolved label key, andvalue-*modes use the resolved value key.- Unknown values fall back to
"none".
Example:
json
{
"type": "select",
"id": "item_id",
"label": "Item",
"path": "item_id",
"options": {
"source": "formData",
"path": "items",
"labelKey": "item_id",
"valueKey": "item_id"
},
"sort": "label-asc"
}DatasetPicker
User selects one or many datasets from the database.
json
{
"type": "datasetPicker",
"id": "input_dataset",
"label": "Dataset",
"path": "input_dataset",
"helpText": "Select one or more existing datasets",
"source": ["csvfile", "imagefile"],
"multiple": true,
"valueKey": "id",
"labelKey": "name",
"excludeSelf": true,
"filtersRemovable": false,
"filters": {
"metadata.collection_id.value": { "ref": "$root", "path": "collection_id" }
}
}Set "filtersRemovable": false to keep configured filters fixed in the picker. If omitted, filters are removable. Set "excludeSelf": true to exclude files from the same upload when the current file has an upload_id.
source:one or more file model typesmultiple:single or multiple dataset selectionvalueKey:stored value mappinglabelKey:label mappingfilters:optional listing filters
NOTE
In this example only datasets linked to the same collection can be selected.
Matrix / Table
A matrix field represents a relationship between two dynamic lists, where each intersection stores a value.
json
{
"type": "matrix",
"id": "display_slots_matrix",
"label": "Display Slots",
"path": "display_slots",
"helpText": "Assign uploaded files to display slots",
"rows": {
"from": {
"source": "formData",
"path": "collections",
"where": {
"collection_id": { "ref": "$root", "path": "collection_id" }
},
"valuePath": "display_slots"
},
"item": {
"key": "",
"labelKey": ""
},
"allowAdd": true,
"allowRemove": true,
"extraRowsPath": "display_slots_extra"
},
"cols": {
"prependStatic": [
{
"key": "none",
"label": "None selected"
}
],
"from": {
"path": "_upload.labels",
"source": "values",
"start": 0,
"end": 1
},
"item": {
"key": "",
"labelKey": ""
},
"allowAdd": false,
"allowRemove": false
},
"cell": {
"type": "checkbox",
"defaultValue": false
},
"defaults": {
"colIndexes": [0],
"fillNewRows": true,
"fillNewCols": true
},
"sync": {
"onRowSourceChange": "preserve",
"onColSourceChange": "preserve",
"dropRemovedRows": true,
"dropRemovedCols": true
}
}rows:row axis configurationcols:column axis configurationcell.type:"checkbox","text","number", or"radio"cell.defaultValue:default cell valueallowAdd:user can add extra rows / columnsallowRemove:user can remove extra rows / columnsprependStatic:static entries placed before resolved entriesappendStatic:static entries placed after resolved entriesextraRowsPath:storage path for added rowsextraColumnsPath:storage path for added columnsdefaults:default selection / fill behavioursync:behaviour when row / column sources change
MatrixStaticEntry
json
{
"key": "none",
"label": "None selected"
}label:displayed textkey:optional fixed identifier
MatrixDefaults
json
{
"rows": "none",
"cols": "first",
"rowIds": ["row_a"],
"colIds": ["none"],
"rowIndexes": [0],
"colIndexes": [0],
"fillNewRows": true,
"fillNewCols": true
}rows:default selected row preset:"none","all","first","last"cols:default selected column preset:"none","all","first","last"rowIds:row IDs to default-selectcolIds:column IDs to default-selectrowIndexes:row indexes to default-selectcolIndexes:column indexes to default-selectfillNewRows:apply defaults to newly added rowsfillNewCols:apply defaults to newly added columns
MatrixSync
json
{
"onRowSourceChange": "preserve",
"onColSourceChange": "reset",
"dropRemovedRows": true,
"dropRemovedCols": true
}onRowSourceChange:"preserve"or"reset"onColSourceChange:"preserve"or"reset"dropRemovedRows:remove values for rows that no longer existdropRemovedCols:remove values for columns that no longer exist
Repeat
Creates a list of items that the user can add, edit, and remove dynamically.
json
{
"type": "repeat",
"id": "arguments",
"label": "Additional information",
"path": "arguments",
"helpText": "Add any number of key/value argument pairs",
"minItems": 0,
"maxItems": 20,
"allowAdd": true,
"allowRemove": true,
"allowEdit": true,
"editor": {
"mode": "inline",
"title": "Argument",
"addButtonLabel": "Add Argument",
"editButtonLabel": "Edit Argument"
},
"item": {
"summary": {
"template": "{{key}} : {{value}}"
},
"fields": [
{
"type": "text",
"id": "arg_key",
"label": "Argument Key",
"path": "key",
"placeholder": "Key"
},
{
"type": "text",
"id": "arg_value",
"label": "Argument Value",
"path": "value",
"placeholder": "Value"
}
]
}
}minItems:minimum number of itemsmaxItems:maximum number of itemsallowAdd:user may add itemsallowRemove:user may remove itemsallowEdit:user may edit itemseditor:defines how the item editor is showneditor.mode:"modal","inline", or"embedded"summary.template:item summary display template
Each item contains a set of fields defined in item.fields.
Typical use cases:
- key/value arguments
- additional metadata entries
- lists of parameters
Node Validation (nodes[].validation)
Validation is defined per field using a validation object.
json
{
"validation": {
"required": true,
"present": true,
"minLength": 3,
"maxLength": 255,
"min": 0,
"max": 100,
"minItems": 1,
"maxItems": 5,
"allowedValues": "options",
"minSelectedPerRow": 1,
"messages": {
"required": "This field is mandatory."
}
}
}required:field must not be blankpresent:path must exist in submitted valuesminLength:minimum text lengthmaxLength:maximum text lengthmin:minimum numeric valuemax:maximum numeric valueminItems:minimum number of items for arrays / collectionsmaxItems:maximum number of items for arrays / collectionsallowedValues:either"options"or an explicit list of allowed valuesminSelectedPerRow:matrix-specific minimum checked cells per rowmessages:custom messages by rule name
Layout Nodes (nodes[].type)
Currently supported layout node types are:
sectionrepeatFromSource
Section
A section groups multiple fields or layout nodes under a common title.
json
{
"type": "section",
"title": "General Information",
"retractable": true,
"defaultOpen": true,
"children": [
{
"type": "text",
"id": "comment",
"label": "Comment",
"path": "comment",
"placeholder": "Enter comment",
"helpText": "Optional note",
"retractable": false,
"defaultOpen": true
}
]
}type:node typetitle:UI labelretractable:collapsible regiondefaultOpen:collapsible default statechildren:nested nodes
RepeatFromSource
Creates repeated UI blocks from items loaded from data.
json
{
"type": "repeatFromSource",
"id": "reference_assets_for_collection",
"label": "Reference assets",
"from": {
"source": "formData",
"path": "collections",
"where": {
"collection_id": { "ref": "$root", "path": "collection_id" }
},
"valuePath": "reference_assets"
},
"item": {
"key": { "ref": "$item", "path": "" },
"labelKey": ""
},
"storage": {
"mode": "record",
"path": "reference_assets_selected"
},
"children": [
{
"type": "datasetPicker",
"id": "reference_asset_picker",
"label": "Dataset",
"path": "datasets",
"source": ["csvfile", "imagefile"],
"multiple": true,
"helpText": "Select the datasets used for this asset"
}
],
"allowEmptySelection": true
}id:unique node identifierlabel:UI labelfrom:describes where repeated items come from (uses aDataRef)item:defines how each repeated item is identified and displayed (uses anItemKeyRef)storage:where values are stored. Currently only supports mode"record"children:nested nodes repeated for each list itemallowEmptySelection:allows rendering even if the resolved list is empty
RepeatStorage
json
{
"mode": "record",
"path": "reference_assets_selected"
}mode:currently only"record"path:root storage path for the repeated child values
Post Submission Actions (actions)
Actions define side effects that happen after submit.
Email action
json
{
"type": "email",
"when": "afterSubmit",
"enabled": true,
"to": {
"source": "values",
"path": "notifications"
},
"recipient": {
"emailKey": "email",
"nameKey": "name"
},
"subjectTemplate": "Upload completed for {{collection_id}}",
"bodyTemplate": "A new upload was submitted for {{collection_id}}.",
"dedupeBy": "email",
"skipIfEmpty": true
}type:currently only"email"when:currently only"afterSubmit"enabled:optional on/off switchto:recipient source (uses ActionDataRef)recipient:optional mapping for recipient object shapesubjectTemplate:optional subject templatebodyTemplate:email body templatededupeBy:optional field used to deduplicate recipientsskipIfEmpty:do nothing if no recipients are resolved
Data Resolution
Data resolution defines how form fields can dynamically read and reference values from the current form state or from external reference data.
DataRef
json
{
"source": "formData",
"path": "collections",
"where": {
"collection_id": { "ref": "$root", "path": "collection_id" }
},
"valuePath": "reference_assets",
"typePath": "",
"start": 0,
"end": 1
}source:"values"(current form values) or"formData"(reference data)path:path inside the sourcesources:optional list ofDataRefSourceobjects to combine multiple sourceswhere:optional object that filters resolved items by comparing their fields with other values (each filter value is aValueRef)valuePath:optional path to the array that should be used for repetitiontypePath:optional property containing the item type (used when items include type information)start:optional slice start indexend:optional slice end index
NOTE
Use either path or sources, depending on whether data comes from one place or several.
DataRefSource
json
{
"path": "reference_assets_selected",
"valuePath": "datasets"
}path:path inside the source rootvaluePath:optional nested array path inside each source
ValueRef
json
{
"ref": "$root",
"path": "collection_id"
}ref:"$item"for the currently processed item or"$root"for current form valuespath:optional property inside that value
ItemKeyRef
json
{
"key": { "ref": "$item", "path": "" },
"labelKey": ""
}key:string field name orValueRefused as item identifierlabelKey:optional field name used as display label
NOTE
By omitting the path, the whole item is referenced. By omitting labelKey, the item itself (or key value) is used as label.
ActionDataRef
json
{
"source": "values",
"path": "notifications"
}source:"values"or"formData"path:source path to resolve
Option Sources
Option sources define how select, radio, and multi-checkbox options are built.
Static options
json
{
"source": "static",
"items": [
{ "label": "N/A", "value": "N/A" },
{ "label": "0.7", "value": 0.7 },
{
"label": "Custom",
"kind": "input",
"value": "__custom__",
"placeholder": "Enter value",
"min": 0,
"max": 10,
"step": 0.1
}
]
}source:"static"items:list of static optionslabel:displayed textvalue:stored valuekind: "input":renders an extra input when selectedplaceholder,min,max,step:optional configuration for that extra input
FormData options
json
{
"source": "formData",
"path": "collections",
"labelKey": "collection_id",
"valueKey": "collection_id"
}source:"formData"path:source pathlabelKey:property used as option labelvalueKey:property used as option value
FormDataRelation options
json
{
"source": "formDataRelation",
"from": {
"source": "formData",
"path": "collections",
"where": {
"collection_id": { "ref": "$root", "path": "collection_id" }
}
},
"follow": {
"idsPath": "related_collections",
"targetPath": "collections",
"targetKey": "collection_id"
},
"transform": {
"type": "zipArrays",
"arrays": {
"name": "recipient_names",
"email": "recipient_emails"
},
"copy": {
"collection_id": "collection_id"
}
},
"labelTemplate": "{{name}} ({{email}}) - {{collection_id}}",
"valueKey": "email",
"dedupeBy": "email"
}source:"formDataRelation"from:base source items (uses aDataRef)follow:relation lookup configtransform:how followed items are reshapedlabelTemplate:optional template used to render the option labelvalueKey:property used as option value after transformationdedupeBy:optional property used to remove duplicates
follow
idsPath:property on the source item that contains related IDstargetPath:list in the reference data where those related items should be searchedtargetKey:property on the target items that should match the IDs fromidsPath
Relation transforms
Transforms reshape followed relation data into final option objects.
identity
json
{
"type": "identity"
}- returns the followed items unchanged
pluckArray
json
{
"type": "pluckArray",
"path": "recipient_emails",
"copy": {
"collection_id": "collection_id"
}
}path:array field to pluck from each followed itemcopy:optional extra fields copied from the parent item
zipArrays
json
{
"type": "zipArrays",
"arrays": {
"name": "recipient_names",
"email": "recipient_emails"
},
"copy": {
"collection_id": "collection_id"
}
}arrays:maps output field names to source array fieldscopy:copies additional fields from the parent item into each generated object
