--- title: "Set required" slug: "freaction-set-required" updated: 2026-05-05T09:41:51Z published: 2026-05-05T09:41:51Z canonical: "docs.lobstersoftware.com/freaction-set-required" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Set required *See also:* [Unset required](/v1/docs/en/freaction-unset-required), [Form elements](/v1/docs/en/fre-form-elements) > [!NOTE] > **Actions – Abstract** > > The action [Set required](/v1/docs/en/freaction-set-required) sets the option "required" at runtime for the linked **Target element**. The action [Set required](/v1/docs/en/freaction-set-required) sets the option "required" at runtime for the linked **Target element**. ![images/download/attachments/189433121/image-2024-10-8_11-4-6-version-1-modificationdate-1728378246834-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-8_11-4-6-version-1-modificationdate-1728378246834-api-v2.png) - Without a link to a **Target element**, the action cannot be selected under **Action type**. - The effect of setting the required property for a particular element depends on its properties and the surrounding hierarchy in the form (see below). - The action is also available for [Form elements](/v1/docs/en/fre-form-elements) for which the interactive setting of the required property via the properties window in the [Form designer](/v1/docs/en/fre) is not supported. Consequences of the required property: - If the **Target element** is visible at runtime and the option "Show label" is set, a red asterisk (*) is displayed to the right of the defined label of the element. - If the **Target element** is a direct parent of an [Element containers](/v1/docs/en/fre-element-container-vo) for which the property "Inherit required" is set, the required status is passed on to this element. - If the **Target element** can have a value by type, it is only considered "valid" at runtime if a value (`except $null`) is assigned or the element is *effectively inactive*. - If the **Target element** can have a value according to its type and (like a [Text field](/v1/docs/en/custom-custom-text-field)) allows the display of information texts, it appears with a red frame and the text "This field is required". Since these criteria are evaluated independently of each other and also distributed along a cascade of nested elements with the option "Inherit required", the action [Set required](/v1/docs/en/freaction-set-required) can have many different effects depending on the hierarchy in the form design and the circumstances at runtime. ## Example Master data for customer payment transactions are entered in a form. Depending on the selection for the "Direct debiting" [Check box](/v1/docs/en/fre-check-box-vo), the specification of an "IBAN" (account number) in the [Row layout](/v1/docs/en/fre-element-container-vo-row-layout) "Bank account details" should be required or not. Runtime example: | Variant | Appearance in the form | | --- | --- | | **"Direct debiting" unselected** | ![images/download/attachments/189433121/image2020-6-22_16-20-4-version-1-modificationdate-1728376324646-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-6-22_16-20-4-version-1-modificationdate-1728376324646-api-v2.png) - All elements can be filled optionally. | | **"Direct debiting" selected** | ![images/download/attachments/189433121/image2020-6-22_16-20-29-version-1-modificationdate-1728376324648-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-6-22_16-20-29-version-1-modificationdate-1728376324648-api-v2.png) - The "IBAN" is now a required field. The label is passed on to the parent containers "Bank account details" and "Billing/Payment" via the option "Inherit required", as the attached asterisk in the label indicates. | Configuration: | ![images/download/attachments/189433121/image-2024-10-8_11-5-45-version-1-modificationdate-1728378344917-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-8_11-5-45-version-1-modificationdate-1728378344917-api-v2.png) | For the "Direct debit" [Check box](/v1/docs/en/fre-check-box-vo), the behavior displayed on the left is configured: - The **Triggering even**t [Changed](/v1/docs/en/fretrigger-changed) with all **Change types** ensures that the required status for the [Text field](/v1/docs/en/custom-custom-text-field) "IBAN" is always set accordingly. --- - The **Behavior type** [Filled](/v1/docs/en/frebehav-filled) identifies for a [Check box](/v1/docs/en/fre-check-box-vo) exactly the case that the check mark was set. --- - Under the **Actions on "true"**, the action [Set required](/v1/docs/en/freaction-set-required) is executed with the **Target element** "IBAN", so that this becomes a required field if the check mark for "Direct debiting" is set. --- - Under the **Actions on "false"**, the action [Unset required](/v1/docs/en/freaction-unset-required) cancels the required field for the **Target element** "IBAN", as long as the check mark for "Direct debiting" is not set. **NOTE:** With this configuration, the default setting of the "required" option in the form design for the "IBAN" [Text field](/v1/docs/en/custom-custom-text-field) at runtime is irrelevant, since the effective status is always determined by the action at runtime. However, this logic could be overridden by disabling the "IBAN" element or one of the parent containers, since an *effectively inactive* element is always considered "valid" and can then remain empty despite the required field state. | | --- | --- |