Skip to content

Structured fields: list, JSON, map, address and location

All types also accept common field options. Defaults below are API defaults unless marked SPA. Unspecified presentation options have no universal default; the active widget decides.

Embedded rows stored in a separate <module table>_<field> table.

The list table is resource_<module>_<field>, with a foreign key resource_<module>_<field>_resource_id_foreign on resource_id. MySQL identifiers can be up to 64 characters, so keep strlen("resource_<module>_<field>_resource_id_foreign") <= 64. That leaves 35 characters for <module>_<field>. A longer name makes bakery:apply fail after the table was created: the foreign key fails, and every retry fails with table already exists.

Options: fields: child field objects. SPA mode: list/layout, template, show_actions, item_width, show_ordering, show_handle, title_field, closable. Child options include list_item_min_width and list_item_max_width.

{"identifier": "example_list", "type": "list", "options": {"fields": [{"identifier": "title", "type": "text"}]}}

JSON value, decoded on access and encoded on save.

Options: No additional API options beyond shared field options.

{"identifier": "example_json", "type": "json", "options": {}}

Key/value JSON object. Empty maps are normalized to null.

Options: No additional API options beyond shared field options.

{"identifier": "example_map", "type": "map", "options": {}}

Address map; inherits map serialization and empty-to-null behavior.

Options: No additional API options beyond shared field options; the SPA supplies address inputs.

{"identifier": "example_address", "type": "address", "options": {}}

Geographic point with SRID 4326. Values are [longitude, latitude] or GeoJSON with coordinates.

Options: No additional API options. Server parses exactly two coordinates and selects GeoJSON from the database.

{"identifier": "example_location", "type": "location", "options": {}}