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
-
Finding a specific "Submit" button on a form:
- Inputs:
- Code:
order_submit_button
- Code:
- Result: The action finds the UI element with the code
order_submit_buttonand stores it in a variable namedTEMPLATE_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.
- Inputs:
-
Retrieving a "Product Description" text area to update its content:
- Inputs:
- Code:
product_description_field
- Code:
- Result: The action locates the UI element identified by
product_description_fieldand makes it available asTEMPLATE_COMPONENT. You could then use another action to populate this text area with dynamic product details fetched from your database.
- Inputs:
-
Accessing a "Navigation Bar" component to change its visibility:
- Inputs:
- Code:
main_app_navigation
- Code:
- Result: The action successfully retrieves the entire navigation bar component, identified by
main_app_navigation, and assigns it to theTEMPLATE_COMPONENTvariable. This allows you to dynamically hide or show the navigation bar based on whether a user is logged in or not.
- Inputs: