Form components

This product is not supported for your selected Datadog site. ().
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

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.
SectionA container that groups other components together, with optional conditions applied to the whole group.

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.

Sections

Sections let you group components together within a form. For example, you might create one section for personal information and another for preferences. You can drag and drop components between sections to reorganize a form.

You can also configure conditional logic at the section level, showing or hiding an entire section based on a respondent’s answer to a previous question, in addition to setting conditions on individual components. See Conditional fields.

To add a section:

  1. In the form, click + Add.
  2. Click Section.
  3. Drag existing components into the section, or add new components directly within it.
  4. To set conditions on the section, click the section, then click Conditions and define the rule.

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

お役に立つドキュメント、リンクや記事: