> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Required, optional, and prohibited elements

> Use required, optional, and prohibited elements in FlexiLayout Studio to identify documents, continue matching, and discard incorrect hypotheses.

A distinguishing feature of semi-structured documents is that sets of fields may vary from one document to another. When creating an element, remember that the object or objects it describes may be absent from some images and therefore will not be detected.

Image information may also be lost if incorrect scanning produces dark or bright patches on an image. Objects located in such patches will not be detected either.

For FlexiLayout Studio to continue matching the FlexiLayout even when a particular object is not detected, mark that object as optional.

## Required elements

Objects described by **required** elements must always be present on the images and the program must find them when [matching the FlexiLayout](/flexi-capture/fls/settings/analyze) with images. If the object is not detected, FlexiLayout Studio stops matching the FlexiLayout.

Use required elements to find identifier objects. An identifier object prevents matching the FlexiLayout with a document that belongs to a different type not described by the current FlexiLayout. You can also use required elements to describe objects whose absence means that any further search would be useless.

## Optional elements

In all other cases, use **optional** elements to describe image objects.

Objects described by such elements need not be present on the image or the program may not detect them when matching the FlexiLayout. The matching will still continue and the program will detect the objects described by other elements.

By default, all simple elements are optional.

<Note>
  Unlike simple elements, all Group elements are required by default.
</Note>

## Prohibited elements

The presence of a certain element in a chain of hypotheses may mean that the chain is not correct and should be discarded. These elements are termed **prohibited** elements. When the program encounters a prohibited element, it stops generating hypotheses in that branch.

Thus, elements may be used to identify a document (required elements), to detect blocks (required and optional elements), and to discard incorrect hypotheses (prohibited elements). Prohibited elements may be used, for example, to prevent false FlexiLayout matching.

## Specify how an element is used

You can specify how an element should be used in its **Properties** dialog box (**General** tab).

Required and prohibited elements are indicated as follows:

* **Required** elements are marked with a green marker: <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Element_Req.gif?s=8e24babc9e4b191fff427fcb1bda7a1e" alt="Required element marker" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="20" height="18" data-path="images/flexi-capture/fls/Element_Req.gif" />
* **Prohibited** elements are marked with a red marker: <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Element_Stop.gif?s=ae15d3d927cfd8a7e85c7dddceb2175e" alt="Prohibited element marker" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="19" height="17" data-path="images/flexi-capture/fls/Element_Stop.gif" />
