Ask AI
Skip to main content

Hide an element

Function: Hide an element

This action allows you to control the visibility of user interface (UI) elements within your application. You can choose to simply hide an element from view or completely remove it from the page's structure, preventing any associated data from being rendered.

Input,

  • Element: This is the specific UI component (like a button, text field, or an entire section) that you want to hide or remove. This input is required.
  • Remove element: This is a True/False choice.
    • If set to True (which is the default setting), the element will be completely removed from the page's underlying structure. This means it won't be visible, and its data won't be present in the page's code.
    • If set to False, the element will be hidden from view but will still exist in the page's underlying structure. It just won't be displayed. This input is required.

Output,

This action does not produce any direct output values. Its effect is a change in the visibility or presence of the specified UI element on the page.

Execution Flow,

Real-Life Examples,

  • Example 1: Hiding a "Submit" button after form submission.

    • Inputs:
      • Element: Submit Button
      • Remove element: False
    • Result: After a user successfully submits a form, the "Submit" button disappears from view, preventing accidental double submissions, but it remains in the page's structure in case it needs to be shown again later.
  • Example 2: Removing a "Delete" confirmation message after user interaction.

    • Inputs:
      • Element: Delete Confirmation Message
      • Remove element: True
    • Result: Once a user confirms or cancels a deletion, the "Delete Confirmation Message" is completely removed from the page, ensuring no trace of it remains in the page's code.
  • Example 3: Dynamically showing/hiding a "Discount Code" field based on a checkbox.

    • Inputs:
      • Element: Discount Code Input Field
      • Remove element: False
    • Result: When a user checks a "I have a discount code" box, this action is triggered to make the Discount Code Input Field visible. If they uncheck it, the field becomes hidden again.