Map Field

The map field.

Properties

Title Map
Description Field for objects with key/value pairs that share the same schema for values
Field Type map
Base Field Type array

Schema

Property Type Default Description
items object Schema for array items.
maxItems number Maximum number of items.
minItems number Minimum number of items.
uniqueItems boolean Item values should be unique if true.

Options

Property Type Default Description
animate boolean true Up and down transitions will be animated
collapsed boolean Field set is initially collapsed if true.
collapsible boolean Field set is collapsible if true.
lazyLoading boolean Child fields will only be rendered when the fieldset is expanded if this option is set true.
legendStyle string button Field set legend style.
properties

Example 1

Map field for user profiles. A map field allows you express unique key IDs for an associative array object. Click on the "view" button to show the resulting JSON.

{% raw %} {% endraw %}

Example 2

Here is an example where we hide the _key field.

{% raw %} {% endraw %}

Example 3

Map field rendered in display-only mode.

{% raw %} {% endraw %}

Example 4: Map Validation

This example shows an object with an empty _key property. As a result, the form renders with a validation error. If a non-empty key is filled in, the form validates just fine.

{% raw %} {% endraw %}