--- title: "Set focus to previous element" slug: "freaction-focus-prev" updated: 2026-05-05T11:58:51Z published: 2026-05-05T11:58:51Z canonical: "docs.lobstersoftware.com/freaction-focus-prev" --- > ## 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 focus to previous element *See also:* [Set focus to element](/v1/docs/en/freaction-set-focus), [Set focus to next element](/v1/docs/en/freaction-focus-next) > [!NOTE] > **Actions – Abstract** > > The action [Set focus to previous element](/v1/docs/en/freaction-focus-prev) moves the focus in a form to the "previous" element, that matches a certain **Condition** (see below). The action [Set focus to previous element](/v1/docs/en/freaction-focus-prev) moves the focus in a form to the "previous" element, that matches a certain **Condition** (see below). ![images/download/attachments/189434680/image-2024-10-16_12-13-54-version-1-modificationdate-1729073634200-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-10-16_12-13-54-version-1-modificationdate-1729073634200-api-v2.png) The starting point for searching the "previous" element depends on the settings for the **Target element**: - If no target element is linked, the focus is set to the *previous focusable element* relative to the *executing element*. - If a target element is linked, the focus is set to the *previous focusable element* relative to the *linked element*. A *focusable element* must meet the following criteria: - The element must be of a type that is capable of receiving the focus. - The element must be "active" and "visible", which is the case if the options "Active" and "Visible" are set for the element itself as well as all of its parent containers. - The element must not be "read only", which is the case if the option "Read only" is not set for the element itself nor any of its parent containers. One of the following options for **Condition** must be selected: | Condition | Search criteria | | --- | --- | | **none** | Any *focusable element* may receive focus. | | **empty** | Only an empty *focusable element* may receive focus. | | **filled** | Only a filled *focusable element* may receive focus. | | **empty and required** | Only a *focusable element*, that is empty and required may receive focus. | **NOTE:** If no element before the starting point (see above) in the direction of search (*backwards*) matches the selected search criteria, the focus will stay on the current element. ## Example Help for action [Set focus to next element](/v1/docs/en/freaction-focus-next) features an example, which is applicable for [Set focus to previous element](/v1/docs/en/freaction-focus-prev) except the direction of search.