close

Form components

Overview

Forms are made up of components, which are individual question or input blocks. Each component has a set of configurable elements and optional validation rules. You can also set conditional logic on individual fields to show or hide them based on a respondent’s previous answers.

Component types

When building a form, click Add Component to get started. The following component types are available:

ComponentDescription
Short answerA single-line text input.
ParagraphA multi-line text input.
Number inputA numeric input field.
DropdownA list of options where the respondent selects one. Supports static options or dynamic options.
Radio buttonsA list of options where the respondent selects one.
CheckboxesA list of options where the respondent can select multiple.
RatingA set of rating questions.
ToggleA boolean on/off switch.
RankingA ranked ordering of a list of options.
Date pickerA calendar date selector.
ImageAn image embedded in the form for context or instructions.

Component elements

Each component has a set of configurable elements in the component editor:

ElementDescription
Add a descriptionAn optional description displayed below the component question.
RequiredToggle to determine whether the question requires an answer. Required questions are marked with a red asterisk.
AdvancedConfigure the placeholder text and default value for the component.
RulesConfigure validation rules to restrict the values respondents can submit. See Validation rules.
ConditionsConfigure conditional logic to show or hide the component based on a respondent’s previous answers. See Conditional fields.
StyleChange the component type while preserving its existing options. For example, switch a dropdown to checkboxes without removing and recreating the component.

Validation rules

You can configure validation rules on individual components to restrict the values respondents can submit.

For short answer and paragraph components, you can set a minimum and maximum character length, or restrict input to a specific pattern: email, URL, alphanumeric, or a custom regex.

For number input components, you can set a minimum and maximum value.

Conditional fields

Conditional fields let you show or hide a question based on a respondent’s answer to a previous question. For example, you can show a follow-up question only when a respondent selects a specific option from a dropdown.

To configure a conditional field:

  1. Click a component to open its editor panel.
  2. Click Conditions.
  3. Click Add Condition and define the rule.
  4. Click Save.

You can also view conditions in the Fields panel by clicking the branch icon.

Dynamic dropdown options

Dropdown components can fetch options dynamically from Datadog tag values at runtime. Dynamic options update automatically as your tag values change, without requiring manual edits to the form.

To configure dynamic options:

  1. Click a dropdown component to open its editor panel.
  2. Click Advanced.
  3. Under Options source, select Dynamic.
  4. Select the tag key to use as the source of options.
  5. Optionally, configure substring filtering or cross-tag scope constraints.
  6. Click Save.

JSON editor

In addition to the visual component editor, you can edit the underlying JSON Schema of the form directly. In the Fields panel, click the code icon to open the JSON code editor.

Further reading

Additional helpful documentation, links, and articles: