# Field

The `<field>` tag is very handy if you want to display content that looks like a field on a document. Each field needs to define a `title`. This is displayed according to the type chosen in `type`.

When a document is rendered "editable" fields also automatically display as editable content in the PDF viewer.&#x20;

It can only be used within a [`<body>`](https://docs.atfinity.io/document-xml-adx/adx-elements/body).

## Example

```xml
<field title="The title of this field" type="line_above">
  The value of the field
</field>
```

## Attributes

**`title`**&#x20;

The title of the field. Must the give, but can also be provided as a child component, i.e. with&#x20;

```xml
<field>
  <title>TITLE</title>
  <value>VALUE</value>
</field>
```

**`class` (optional)**

The style class to define how the content looks like. If nothing is specified this is taken from the special class "field\_content"

**`titleClass` (optional)**

The style class to define how the title looks like. If nothing is specified this is taken from the special class "field\_title"

**`spaceAboveLine` (optional)** *New in Atfinity 15*

In fields that display a line, this is the space above the line (in pt, mm or cm)&#x20;

**`spaceBelowLine` (optional)** *New in Atfinity 15*

In fields that display a line, this is the space below the line (in pt, mm or cm)&#x20;

**`titleWidth` (optional)** *New in Atfinity 15*

In fields that display the title left of the value, this is the width of the title (in pt, mm or cm)&#x20;

**`spaceBefore` (optional)**

Adds space (in pt, mm or cm) before the field

**`spaceAfter` (optional)**

Adds space (in pt, mm or cm) after the field

**`type` (optional)**

The main styling option of the field. Available types are `line_below`, `line_right`, `line_above`, `bow_below` and `box_right`. If nothing is specified the `box_below` type is used.&#x20;

**`editable`** (optional)

This overwrites the automatic behaviour to display a field as editable. If you set `editable="false"` the field can never be edited. If you set it to `editable="true"` the field can always be edited, even when rendered in a normal PDF.

<details>

<summary></summary>

</details>
