# Elements and nesting

<PageBadges />

`form.elements` is an ordered array of fields and containers. Containers can nest other
fields via their own `elements` array.

## Keys and data names

- `data_name`: human-readable identifier used as the value key in engine state (unique, lowercase a-z, 0-9, underscore only, maximum 42 characters)
- `key`: internal identifier, typically derived from `data_name` (unique, hexadecimal, 8 characters)

When referencing fields in conditions or `title_field.elements`, you can use either `key` or `data_name`. Using `data_name` is often more practical when writing schemas manually since it's more memorable.

## Containers

The following field types can contain nested elements:

- `Section` – groups fields visually
- `RepeatableSection` – allows multiple instances of its children

`BuildingPlanSection` also supports nested elements but has specialized behavior for dynamic form generation. See [BuildingPlanSection](/core/fields/containers#buildingplansection) for details.

## Example

```json
{
  "type": "Section",
  "key": "personal_section",
  "data_name": "personal_section",
  "label": "Personal info",
  "display": "inline",
  "description": null,
  "description_mode": null,
  "visible": true,
  "visible_conditions": null,
  "elements": [
    {
      "type": "TextField",
      "key": "first_name",
      "data_name": "first_name",
      "label": "First name",
      "display": "default",
      "description": null,
      "description_mode": null,
      "required": true,
      "required_conditions": null,
      "visible": true,
      "visible_conditions": null,
      "read_only": false,
      "read_only_conditions": null,
      "default_value": null,
      "pattern": null,
      "pattern_description": null,
      "supporting_image": false,
      "supporting_image_path": null,
      "supporting_image_display": null
    }
  ]
}
```
