Skip to main content
Version: 1.28 (Current)

Forms 2.0 - Dynamic Container

caution

This page is preliminary and subject to change as Forms 2.0 continues to be developed.

A container that holds other fields, just like a Layout Container - but fields can also be added into it programmatically at runtime, rather than only at design time in the Form Builder.

Adding a Dynamic Container

Drag the Dynamic Container tile from the field palette onto the Canvas - see Build for more on adding and arranging fields in general. Like a Layout Container, you can also drag fields into it at design time.

Parameters

Only Dynamic Container-specific parameters are listed below. See Common Field Settings for the settings shared with other field types.

FieldDescription
Layout ModeVertical and Horizontal arrange the contained fields automatically. Manual allows free placement and resizing in a mosaic layout.
ColumnsOnly shown in Manual mode. The number of columns in the mosaic layout.
AlignmentOnly shown in Horizontal mode (Top/Middle/Bottom) or Vertical mode (Left/Center/Right). The alignment of the contained fields.
GapSpacing between the contained fields - Compact, Normal, or Loose. Nested containers can also Inherit this from their parent.
PaddingThe padding for the container, in CSS units (for example 8px 0px).
Root CSS ClassesOne or more CSS class names, separated by spaces, applied to the field's root element only. Supports Tokens.

Adding fields at runtime

Beyond fields added at design time, a Dynamic Container can receive fields added by an Add [Field Type] Field action (for example Add Text Box Field, Add Dropdown Field, Add Date Field) attached to a form event. Each of these actions takes the target container's ID, along with the new field's Name, Label, Hint, and other settings (initial value, layout position, visibility/enabled conditions, and so on), and inserts that field into the container when the action runs. Not every field type can be added this way - as of this writing, Text Box, Textarea, Dropdown, Date, Time, Money, Phone, Rich Text Box, and Content Block are supported.

Common settings that apply to Dynamic Container

A Dynamic Container supports these Common Field Settings:

  • General (Label and Name only - Dynamic Container does not support Hint)
  • Active
  • Visibility settings
  • Enabled settings

Dynamic Container does not support Field Automations or Field Validators, since it has no value of its own to bind or validate.

Tokens

A Dynamic Container returns its contained fields' values in three forms, referenced using the field's Name - for example, if the field's Name is DetailsContainer:

TokenDescription
[DetailsContainer]A JSON object with the value of every field it contains.
[DetailsContainer:Json]A JSON object keyed by field ID instead of field Name (for example {"field1":"value1","field2":"value2"}).
[DetailsContainer:QueryString]The same field values joined in query-string format (for example field1=value1&field2=value2).