Ask AI
Skip to main content

Clear dropdown choices

Function: Clear dropdown choices

This action allows you to remove all the options from a specific dropdown menu on your application page. It's useful when you need to reset a dropdown, prepare it for new dynamic options, or simply make it empty.

Input

  • UI element
    • Description: The specific dropdown menu on your page from which you want to remove all choices.
    • Type: UI element (specifically a dropdown field)
    • Required: Yes

Output

This action does not produce a direct output value. Its effect is to modify the specified UI element by clearing all its current choices.

Execution Flow

Real-Life Examples

Here are some practical ways you can use the "Clear dropdown choices" action:

Example 1: Resetting a Form Field

Imagine you have a form where users select a "Country" from a dropdown. After the user submits the form, you want to clear this dropdown so it's empty for the next entry.

  • Inputs:
    • UI element: Country_Dropdown
  • Result: The Country_Dropdown on your form will become empty, with no country options displayed.

Example 2: Dynamic Filtering with Dependent Dropdowns

You have two dropdowns: "Product Category" and "Product Sub-Category". When a user selects a new "Product Category," you first want to clear the "Product Sub-Category" dropdown before populating it with new options relevant to the chosen category.

  • Inputs:
    • UI element: Product_Sub_Category_Dropdown
  • Result: The Product_Sub_Category_Dropdown will be emptied, ready to receive new sub-category options based on the selected product category.

Example 3: Initializing a Page with Empty Fields

When a specific page loads, you might want to ensure that a "Shipping Method" dropdown is empty by default until the user provides other necessary information (like a destination address).

  • Inputs:
    • UI element: Shipping_Method_Dropdown
  • Result: Upon page load, the Shipping_Method_Dropdown will be cleared, showing no pre-selected or default shipping options.