--- title: "Set read only" slug: "freaction-set-read-only" updated: 2026-05-06T08:53:39Z published: 2026-05-06T08:53:39Z canonical: "docs.lobstersoftware.com/freaction-set-read-only" --- > ## 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 read only *See also*: [Enable element](/v1/docs/en/freaction-enable), [Disable element](/v1/docs/en/freaction-disable), [Form elements](/v1/docs/en/fre-form-elements) > [!NOTE] > **Actions – Abstract** > > The [Set read only](/v1/docs/en/freaction-set-read-only) action sets or clears the "Read only" option for the linked **Target element** at runtime. The [Set read only](/v1/docs/en/freaction-set-read-only) action sets or clears the "Read only" option for the linked **Target element** at runtime. This option must not be set if an element should be *effectively editable* (see note below). An element for which the "Read only" option is set is always *effectively read only*. If it is also *effectively active* and *effectively visible*, it accepts certain interactions (accept focus, expand/collapse, select/copy content with Ctrl+C, etc.), but the value of the element cannot be changed. Regarding its visual appearance, the element shows no or little difference from being *effectively editable*. ![images/download/attachments/189435025/image-2024-10-17_15-8-2-version-1-modificationdate-1729170482066-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-17_15-8-2-version-1-modificationdate-1729170482066-api-v2.png) ![images/download/attachments/189435025/image-2024-10-17_15-8-29-version-1-modificationdate-1729170509193-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-17_15-8-29-version-1-modificationdate-1729170509193-api-v2.png) - The action can only be selected under **Action type** if a **Target element** is linked. - The selection for the **Read only** switch determines whether the "Read only" option is set (ON, left) or removed (OFF, right). - The "Read only" property is available for all [Form elements](/v1/docs/en/fre-form-elements). > [!NOTE] > **NOTE:** > > [Set read only](/v1/docs/en/freaction-set-read-only) with the **Read only** parameter "ON" (Set read only): > > - The [Set read only](/v1/docs/en/freaction-set-read-only) action (with **Read only** "ON") always turns the **Target element** *effectively read only* at runtime. > - If a **Target Element** of the [Element containers](/v1/docs/en/fre-element-container-vo) type turns *effectively read only*, then all its direct child elements also turn *effectively read only*. If these are "not set read only" themselves, they are then considered to be *latently editable*. > - Access to an *effectively read only* element can be restricted by settings for additional options ("Active", "Visible" – see [Form elements](/v1/docs/en/fre-form-elements)) for the same or a parent element. > > [Set read only](/v1/docs/en/freaction-set-read-only) with the **Read only** parameter "OFF" (cancel read only): > > - The **Target element** can only be *effectively editable* at runtime with the [Set read only](/v1/docs/en/freaction-set-read-only) (with **Read only** "OFF") if none of the [Element containers](/v1/docs/en/fre-element-container-vo) on a parent level in the form design is "set to read only". > - If a **Target element** of the [Element containers](/v1/docs/en/fre-element-container-vo) type is *effectively editable*, then all the direct child elements that were previously "not set read only" (i.e. *latently editable*) are also *effectively editable*. > - Access to an *effectively editable* element can be restricted by settings for additional options ("Active", "Visible" – see [Form elements](/v1/docs/en/fre-form-elements)) for the same or a parent element. ## Example In a user registration form, the new user should enter an e-mail address as a unique identifier. If this address is validated, the input field should be set to "read only" when the element loses the focus. At the same time, a button is activated that can be used to remove the read only protection for the "E-mail" [Text field](/v1/docs/en/custom-custom-text-field) for corrections. Runtime example: | Situation | View in the form | | --- | --- | | Input of an invalid e-mail address (domain without TLD). | ![images/download/attachments/189435025/image2020-6-23_12-2-43-version-1-modificationdate-1729169547769-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-6-23_12-2-43-version-1-modificationdate-1729169547769-api-v2.png) - As long as a valid e-mail address has not yet been entered, the "E-mail" field can also be edited after exiting. | | Correct the e-mail address by inserting a dot in the domain. | ![images/download/attachments/189435025/image2020-6-23_12-3-8-version-1-modificationdate-1729169547771-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2020-6-23_12-3-8-version-1-modificationdate-1729169547771-api-v2.png) - After entering a valid e-mail in the [Focus out](/v1/docs/en/fretrigger-focus-out) event, the field is read only and the button for editing is enabled. | Configuration: | ![images/download/attachments/189435025/image-2024-10-17_15-11-20-version-1-modificationdate-1729170679892-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-17_15-11-20-version-1-modificationdate-1729170679892-api-v2.png) | For the "E-mail" [Text field](/v1/docs/en/custom-custom-text-field) the behavior shown on the left is configured to set the option "Read only" for the field itself and the option "Active" for the adjacent [Button](/v1/docs/en/fre-button-vo) as desired: - The behavior reacts to the **Triggering event** [Focus out](/v1/docs/en/fretrigger-focus-out), so that the switch only takes place when the user specifically finishes editing. --- - The **Behavior type** [Validate element](/v1/docs/en/frebehav-validate) checks whether the input is acceptable as an e-mail address (criteria are defined by a [Validators](/v1/docs/en/frevalidators) for the text field). --- - Under the **Actions on "true"**, if the validation is passed, the action [Set read only](/v1/docs/en/freaction-set-read-only) with the **Read only** parameter "ON" ensures that the "E-mail" [Text field](/v1/docs/en/custom-custom-text-field) that is linked as the **Target element** is set as read only. In addition, the [Enable element](/v1/docs/en/freaction-enable) action is executed for the [Button](/v1/docs/en/fre-button-vo) (not expanded in image). --- - Under the **Actions on "false"** for "invalid" entries, the same action with the **Read only** parameter "OFF" ensures that the field can be edited. In addition, the [Disable element](/v1/docs/en/freaction-disable) action is executed for the [Button](/v1/docs/en/fre-button-vo) (not expanded in image). | | --- | --- |