> For the complete documentation index, see [llms.txt](https://api-docs.intratool.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.intratool.help/api-reference/layouts/content-element-types.md). Agents can also search and read this documentation through its [MCP server](https://api-docs.intratool.help/~gitbook/mcp).

# ContentElementTypes

## Introduction

`ContentElementTypes` define the accepted `type` values and type-specific `config` of [ContentElements](https://api-docs.intratool.help/api-reference/layouts/content-elements.md). The `text` type stores [Rich Text](https://api-docs.intratool.help/introduction/rich-text.md) in `config.text` and accepts validated [System Variable templates](https://api-docs.intratool.help/introduction/system-variables.md#rendered-templates).

Layout structure and resource assignments are described under [Layouts](https://api-docs.intratool.help/introduction/layouts.md). The result content described here is resolved from the form message or task execution available in the rendering context.

## Available Content Element Types

Each example is a JSON request body for [Admin: Create ContentElement](https://api-docs.intratool.help/api-reference/layouts/content-elements.md#admin-create). The examples assume destination column ID `1` already exists in an output layout. Result examples additionally reference existing field ID `1` or source layout ID `1`; the source layout is distinct from the output layout. Shared metadata, placement keys, and update behavior are documented on the ContentElements endpoint page.

### `formFieldResult` <a href="#content-element-type-form-field-result" id="content-element-type-form-field-result"></a>

Renders one [FormField](https://api-docs.intratool.help/api-reference/forms/form-fields.md) result from the current rendering context. The field's name and formatted result form the output; field help descriptions are optional.

**Configuration keys**

| Key                              | Type      | Requirement       | Description                                     |
| -------------------------------- | --------- | ----------------- | ----------------------------------------------- |
| `config.form_field_id`           | `integer` | Required          | Existing FormField ID whose result is rendered. |
| `config.with_field_descriptions` | `boolean` | Optional; `false` | Include the field's help description.           |

**Example payload**

```json
{
  "type": "formFieldResult",
  "lang_id": "en-US",
  "title": "Requested item",
  "layout_column_id": 1,
  "config": {
    "form_field_id": 1,
    "with_field_descriptions": true
  }
}
```

### `formFieldResults` <a href="#content-element-type-form-field-results" id="content-element-type-form-field-results"></a>

Renders the available field results for an input [Layout](https://api-docs.intratool.help/api-reference/layouts/layouts.md). `config.layout_id` selects the source layout, while `layout_column_id` places this ContentElement in the output layout. Layout presentation, empty results, description fields, and field help descriptions have separate configuration keys.

**Configuration keys**

| Key                              | Type      | Requirement       | Description                                                                              |
| -------------------------------- | --------- | ----------------- | ---------------------------------------------------------------------------------------- |
| `config.layout_id`               | `integer` | Required          | Existing source layout ID.                                                               |
| `config.show_layout`             | `boolean` | Required          | Preserve the source layout's row-and-column presentation; `false` renders a result list. |
| `config.with_empty_fields`       | `boolean` | Required          | Include empty field results.                                                             |
| `config.with_description_fields` | `boolean` | Required          | Include non-input description fields.                                                    |
| `config.with_field_descriptions` | `boolean` | Optional; `false` | Include help descriptions for result fields.                                             |

**Example payload**

```json
{
  "type": "formFieldResults",
  "lang_id": "en-US",
  "title": "Submitted results",
  "layout_column_id": 1,
  "config": {
    "layout_id": 1,
    "show_layout": true,
    "with_empty_fields": false,
    "with_description_fields": false,
    "with_field_descriptions": true
  }
}
```

### `text` <a href="#content-element-type-text" id="content-element-type-text"></a>

Renders HTML from `config.text`. The text accepts System Variable templates and form-field-results blocks. Translations for this content are stored in `config.text`, separately from the ContentElement's `title` and `description`.

**Configuration keys**

| Key           | Type     | Requirement | Description                                                |
| ------------- | -------- | ----------- | ---------------------------------------------------------- |
| `config.text` | `string` | Required    | Non-empty HTML text with a valid System Variable template. |

**Example payload**

```json
{
  "type": "text",
  "lang_id": "en-US",
  "title": "Confirmation",
  "layout_column_id": 1,
  "config": {
    "text": "<p>Please retain this confirmation.</p>"
  }
}
```

#### Form Field Results Block <a href="#form-field-results-block" id="form-field-results-block"></a>

A form-field-results block embeds a result section between ordinary text blocks inside `config.text`. It belongs to a ContentElement of type `text`; it is not an additional ContentElement type.

This example renders submitted form results between two paragraphs in a form's email layout. It uses the form's input layout, excludes empty results and non-input description fields, and includes field help descriptions. The `formMessage` source must be available in the rendering context.

**Example payload**

```json
{
  "type": "text",
  "lang_id": "en-US",
  "title": "Submission summary",
  "layout_column_id": 1,
  "config": {
    "text": "<p>Submitted results:</p><div class=\"form-field-results-block\" data-source=\"formMessage\" data-layout-type=\"default\" data-with-description-fields=\"false\" data-with-empty-fields=\"false\" data-with-field-descriptions=\"true\"></div><p>End of results.</p>"
  }
}
```

**HTML in `config.text`**

```html
<p>Submitted results:</p>
<div
  class="form-field-results-block"
  data-source="formMessage"
  data-layout-type="default"
  data-with-description-fields="false"
  data-with-empty-fields="false"
  data-with-field-descriptions="true"
></div>
<p>End of results.</p>
```

The block is a document-level sibling of the paragraphs, outside paragraph and inline wrappers. Boolean HTML attributes contain the strings `true` or `false`; they are part of the HTML string rather than JSON boolean fields. When layout output is enabled, the selected source layout must not reference the output recursively.

The required `data-layout-type` selects the layout and presentation. Set it to `""` for a flat list from the input layout; the example uses `default` to preserve its structure. The complete [block attribute contract](https://api-docs.intratool.help/introduction/system-variables/formatters.md#form-field-results-blocks) defines the supported source/layout combinations and other attributes.
