Address Widget¶
type: 'address', widget: 'form' — a composite field that owns seven sibling columns (<name>_number|complement|street|zip_code|city|state|country) rather than mapping to a single database column. Declaring one address field expands into a small, consistent group of inputs wherever it's used.
Descriptor¶
The engine derives the seven sibling field names from billing_address automatically (billing_address_number, billing_address_street, …) — you declare one field, not seven. propertymanagement's Address* fields are the shipped example.
Map autocomplete¶
When the workspace has configured an OpenStreetMap/Nominatim connector (Settings → Global settings → Integrations), the widget offers live address autocomplete, proxied through a Next.js BFF route (apps/shell/app/api/integrations/osm/search/route.ts) — the browser never calls Nominatim directly, and the connector's base URL/user-agent/API key never reach client JavaScript. "Number and street" is one combined input ("12 Main Street") parsed on blur into the number and street columns; suggestions are shortened to number + extension + street, city, state, country and zip code, and a house-number extension (bis, ter, B…) is stored at the head of the street, since the number column is an integer. See Settings → OpenStreetMap connector.
Without a configured connector, the widget still works as seven plain text/selection inputs — the map lookup is a progressive enhancement, not a hard dependency.
Pitfalls¶
- The seven underlying columns are real, individually-queryable database columns — a
filter[]orsearch[]against, say,billing_address_cityworks exactly like any other text column (see ORM → Query Parameters); there's no single "address" column to query. - Field-level group gating (ADR-014) is applied per underlying column, not to the composite as a whole — gating
billing_address_streetdoesn't automatically gate the other six.
Related¶
- Totals Widget — the other composite-field primitive
- Settings & Workspace Configuration