Ask AI
Skip to main content

Get template ui element by code

Function: Get Template UI Element by Code

This action helps you find and retrieve a specific user interface (UI) element from your application's templates using its unique identifier, known as a "code." This is useful when you need to work with a particular part of your page or component, like a button, a text box, or an entire section, within your no-code logic.

Input

  • Code (Text): The unique code assigned to the UI element you want to find. This code acts like a name tag for the element.

Output

  • UI element (UI element): The actual UI element that was found using the provided code. This element can then be used in subsequent actions. By default, it will be stored in a variable named TEMPLATE_COMPONENT.

Execution Flow

Real-Life Examples

  1. Finding a specific "Submit" button on a form:

    • Inputs:
      • Code: order_submit_button
    • Result: The action finds the UI element with the code order_submit_button and stores it in a variable named TEMPLATE_COMPONENT. You can then use this variable in a subsequent action to, for example, disable the button after a successful order submission to prevent duplicate entries.
  2. Retrieving a "Product Description" text area to update its content:

    • Inputs:
      • Code: product_description_field
    • Result: The action locates the UI element identified by product_description_field and makes it available as TEMPLATE_COMPONENT. You could then use another action to populate this text area with dynamic product details fetched from your database.
  3. Accessing a "Navigation Bar" component to change its visibility:

    • Inputs:
      • Code: main_app_navigation
    • Result: The action successfully retrieves the entire navigation bar component, identified by main_app_navigation, and assigns it to the TEMPLATE_COMPONENT variable. This allows you to dynamically hide or show the navigation bar based on whether a user is logged in or not.