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

# Conditional read-only

> Lock a field based on conditions. Show it but prevent editing when specific criteria are met.

## What this does

Conditional read-only lets you lock a field based on conditions. When the conditions are met, the field is visible but cannot be edited. It behaves like a read-only display. When the conditions are not met, the field is editable normally.

This is different from the static **Read-only** toggle, which always locks the field.

## When to use it

* Lock a "Price" field once a status field is set to "Approved"
* Prevent editing an email field if it was pre-filled via URL
* Lock a "Quantity" field after a "Confirmed" checkbox is checked
* Protect a calculated field from being overridden in certain states

## Setting up conditional read-only

<Steps>
  <Step title="Click the field">
    Click the field in the canvas to open its settings panel.
  </Step>

  <Step title="Expand the Conditional read-only section">
    Expand the **Conditional read-only** section in the settings panel.
  </Step>

  <Step title="Toggle 'Read-only rule' on">
    Enable the toggle to reveal the condition trigger.
  </Step>

  <Step title="Set the conditions">
    Click the **Read-only when...** trigger to open the filter builder dialog. Add conditions using the visual builder. When these conditions are true, the field locks. When they are false, the field is editable. Click **Done** when finished.
  </Step>
</Steps>

## Settings

| Setting               | Description                                                                                     |
| --------------------- | ----------------------------------------------------------------------------------------------- |
| **Read-only rule**    | Toggle to enable conditional locking for this field.                                            |
| **Read-only when...** | Filter builder defining the conditions that lock the field. Only visible when the toggle is on. |

## How it differs from display conditions

| Feature                   | Conditional visibility  | Conditional read-only             |
| ------------------------- | ----------------------- | --------------------------------- |
| When conditions are met   | Field is hidden         | Field is visible but locked       |
| Respondent sees the field | No                      | Yes                               |
| Value can be edited       | N/A (field not visible) | No                                |
| Value is submitted        | No                      | Yes (existing value is preserved) |

## Common questions

<AccordionGroup>
  <Accordion title="What happens to the field's value when it's locked?">
    The existing value is preserved and submitted as-is. If the field was pre-filled (via default value or URL parameter), that pre-filled value is submitted. If it was blank, it submits blank.
  </Accordion>

  <Accordion title="Can I combine conditional read-only with conditional visibility?">
    Yes. You could use conditional visibility to show the field based on one condition, and conditional read-only to lock it based on a different condition. Both can be active on the same field.
  </Accordion>

  <Accordion title="Does the read-only tag appear in the editor?">
    Yes. When a field has conditional read-only enabled, a **Conditional lock** (slate) tag appears in the top-right corner of the field card in the editor canvas.
  </Accordion>
</AccordionGroup>
