Skip to main content
Version: 1.28 (Current)

Dynamic Fields

Audience: Low-code Engineers

Skill Prerequisites: Forms, Tokens

The Dynamic Fields actions add fields to a form while it loads, instead of placing them in the form builder. Use them when the fields a form needs aren't known until runtime, for example one question for each row in a database table, or extra fields that depend on the user.

Each action adds one field of a particular type, such as a textbox, dropdown or file upload, into a Dynamic Field Container on the form. Load dynamic field from JSON adds several fields of any type in one step.

note

Dynamic fields require the Forms Dynamic feature to be licensed. If it isn't, the actions fail with a message that the feature is unlicensed.

How it works​

  1. Add a Dynamic Field Container field to the form. You'll find it in the Hidden Data category of the field list. Its ID, for example Questions, is the Container Id the actions use. The container's layout and CSS settings are copied to every field added to it.
  2. Add the Dynamic Fields actions to the form's On PreInit or On Init actions. The fields are created each time the form loads. Fields added by actions on a button click aren't displayed.
  3. Fields appear in the order the actions run. To add a field for each row of a list, put the action inside Execute Actions for each List Entry and build the Field Id from the list's tokens.
  4. Submitting the form. The added fields are remembered and validated like normal fields. Each field's value is available in the [FieldId] token, just like a field placed in the form builder.

Dynamic Field Container tokens​

When the form is submitted, the container provides the values of all its dynamic fields in two extra tokens:

TokenExample
[<ContainerId>:Json]{"Color":"red","Nickname":"Jay"}
[<ContainerId>:QueryString]Color=red&Nickname=Jay

These are useful when you don't know the field IDs in advance, for example to save all answers to one database column with Run SQL Query.

The container's Submit Hidden Fields setting controls whether fields hidden by a Bind Expression - Show are still submitted.

Field IDs​

  • Field Id is cleaned the same way as IDs in the form builder: leading characters that aren't letters are removed, and so is every character other than letters, numbers and _. For example, 1st Name! becomes stName. If nothing is left, the action fails with Invalid field id.
  • Every field on the form needs a unique ID. If a field with the same ID already exists, the action fails with Field Id ... already exists in this form.
  • Each Add action saves the cleaned ID in a token, so later actions can refer to the field. See Field ID Token Name below.

Common Parameters​

Most Add actions share the parameters below. Each action's page lists its own additional parameters and any of these it doesn't have.

ParameterDescriptionSupports TokensDefaultRequired
Container IdThe ID of the Dynamic Field Container to add the field to. If it's empty, the action does nothing, without an error. If no container has this ID, the action fails with Specified field container was not found.Yesempty stringYes
Field IdThe ID of the new field, used in the [FieldId] token. See Field IDs.Yesempty stringYes
Field TitleThe field's label. It's required even for fields that don't show a label, such as hidden fields.Yesempty stringYes
Field DescriptionHelp text shown with the field.Yesempty stringNo
Enable ConditionallyA condition that decides whether the field accepts input, for example [Status] == "Draft". It's evaluated when the form loads. When set, it overrides the container's enabled setting.Yesempty stringNo
Initial ValueThe field's starting value. It's also placed in the [FieldId] token straight away, so the actions that follow can use it.Yesempty stringNo
Secure InputWhen checked, the submitted value is HTML-sanitized. Available on Add Textbox, Add Large Text and Add Hidden Field with Custom Value. See Secure Input.NoCheckedNo
Bind Expression - ShowA JavaScript condition that shows or hides the field as the user fills in the form, for example [PaymentMethod] == 'CreditCard'.See Tokenize Bind Expressions?empty stringNo
Preserve Layout?When checked, hiding the field keeps its space so the layout doesn't shift.NoUncheckedNo
Bind Expression - ValueA JavaScript expression that calculates the field's value from other fields, for example [FirstName] + ' ' + [LastName]. Once the user edits the field, it stops updating.See Tokenize Bind Expressions?empty stringNo
Bind Expression - On Change/ClickJavaScript to run when the value changes. Refer to fields with [FieldId], which maps to form.fields.FieldId.value. Requires the Scripting feature to be licensed.See Tokenize Bind Expressions?empty stringNo
Tokenize Bind Expressions?When checked, tokens in the three bind expressions are replaced when the field is added. In Show and Value, a token that names a field becomes a reference to that field, which is what you need when field IDs are built from tokens. In On Change/Click, tokens are replaced with their values.NoUncheckedNo
ReadonlyMakes the field read-only. Enter true, false, 1, 0 or a condition. Only Add Textbox applies this setting.Yesempty stringNo
CSS ClassCSS classes for the input, added to the container's classes.Yesempty stringNo
CSS StylesInline styles for the input, added to the container's styles.Yesempty stringNo
Label CSS ClassCSS classes for the label, added to the container's label classes.Yesempty stringNo
Label CSS StylesInline styles for the label, added to the container's label styles.Yesempty stringNo
Is RequiredWhether the field must be filled in. Enter true, false, 1, 0 or a condition such as [Type] == "Business". Empty means not required.Yesempty stringNo
Validation ConditionA condition that decides whether the field's validation runs, for example [Country] == "US".See Tokenize Validators?empty stringNo
Custom Validator #1, #2Validators to apply, chosen from the form's validators.See Tokenize Validators?none selectedNo
Tokenize Validators?When checked, tokens in the validators and Validation Condition are replaced when the field is added. When unchecked, they're replaced when the form is submitted, so they can use the submitted values.NoCheckedNo

Output Parameters Reference​

ParameterDescription
Field ID Token NameOptional. The name of a token that receives the cleaned field ID. If empty, the ID is saved in [<FieldId>:Name] instead.

List Parameters​

The actions that add list fields (dropdowns, checkbox lists, radio boxes and tags) get their options from a data source. They share these parameters:

ParameterDescriptionSupports TokensDefaultRequired
Data SourceWhere the options come from. Pick a data source, then fill in its settings. See the common data sources below.Yesnone selectedYes
Tokenize Datasource ParametersWhen checked, tokens in the data source settings are replaced when the field is added. Keep it checked when the action runs inside Execute Actions for each List Entry, because the loop's tokens only exist at that moment.NoCheckedNo
Link ToDropdown, Dropdown with Checkboxes, Checkbox List and Radio Boxes only. The IDs of one or more fields, separated by commas, that this list depends on. When one of them changes, this list only shows options whose value starts with the selected value. See Cascading lists.Yesempty stringNo

Common data sources​

Data sourceSettings
ItemsItems List: one option per line, as Text|Value, for example Red|R. If there's no |, the text is also the value.
SQL QueryA query that returns the options. Return one column, or two columns named Text and Value. Requires the Data Integration feature.

Other data sources, such as users, roles, countries and time zones, are also available.

In exported action JSON, the data source is stored as one object: the data source name in Value, and its settings beside it:

"DataSource": {
"Expression": "",
"Value": "Items",
"IsExpression": false,
"Items": "Red|R\nGreen|G\nBlue|B"
}

Cascading lists​

To make a list depend on another field, enter that field's ID in Link To, and start each option with the parent value followed by /. For example, a City list linked to a Country field could use these items:

US/New York|NYC
US/Chicago|CHI
UK/London|LON

When the user picks US in Country, City only shows New York and Chicago. To use a / in an option's text, write \/.

Values of list fields​

Field type[<FieldId>] after submit
Single choice: Dropdown, Dropdown with Autocomplete, Radio BoxesThe selected value.
Multiple choice: Checkbox List, Dropdown with Checkboxes, Tags InputThe selected values, separated by commas, for example R,B. [<FieldId>:Text] gives the texts separated by commas and spaces, and [<FieldId>:JsonArray] gives the values as a JSON array.

Considerations​

  • Use On PreInit or On Init. Dynamic fields must be added while the form loads.
  • Watch empty tokens. If Container Id comes from a token that turns out empty, no field is added and no error is shown.
  • A form field wins. If a dynamic field and a field placed in the form builder somehow share an ID, the form builder field's value is used.

Actions in this category​

ActionAdds
Add TextboxA single-line text input.
Add Large TextA multi-line text area.
Add Number InputA number input with optional minimum and maximum.
Add CheckBox (True/False)A single checkbox.
Add Hidden Field with Custom ValueA hidden value that's submitted with the form.
Add StaticTextText that's displayed but not submitted.
Add SliderA slider for choosing a number.
Add Date Time PickerA date, time, or date and time picker.
Add Date and Time (Deprecated)The older date picker. Use Add Date Time Picker instead.
Add DropdownA dropdown list.
Add Dropdown with AutocompleteA searchable dropdown.
Add Dropdown with CheckboxesA dropdown that allows several selections.
Add Checkbox ListA list of checkboxes.
Add Radio BoxesA list of radio buttons.
Add Tags InputAn input for entering several tags.
Add Single File UploadAn upload field for one file.
Add Multi File UploadAn upload field for several files.
Load dynamic field from JSONSeveral fields of any type, described in JSON.

Revised 09/25/2026