Clear radiobutton choices
Function: Clear radiobutton choices
This action allows you to instantly remove all predefined choices from a specific radio button field on your application's forms. It's useful when you need to dynamically update the available options or reset a field to an empty state, ensuring users can't select outdated or irrelevant choices.
Input
- UI element The specific radio button field on your form from which you want to remove all existing choices. This input is mandatory.
Output
This function does not produce any direct output. Its effect is a change to the specified UI element.
Execution Flow
Real-Life Examples
Here are some practical scenarios where you might use the "Clear radiobutton choices" function:
Example 1: Resetting a "Preferred Contact Method" field
Imagine you have a user profile form where users select their "Preferred Contact Method" using radio buttons (e.g., Email, Phone, SMS). If a user changes their country, and some contact methods are not available in the new country, you might want to clear the existing choices before loading new, relevant ones.
- Inputs:
- UI element:
Preferred Contact Method(a radio button field)
- UI element:
- Result: All existing choices like "Email", "Phone", "SMS" are removed from the "Preferred Contact Method" radio button field, making it empty.
Example 2: Clearing options in a "Product Category" filter
Consider an e-commerce application where users can filter products by "Product Category" using radio buttons. If a user selects a specific "Department" (e.g., "Electronics"), you might want to clear the "Product Category" options before populating them with categories relevant only to "Electronics" (e.g., "Laptops", "Smartphones").
- Inputs:
- UI element:
Product Category(a radio button field)
- UI element:
- Result: All previously displayed product categories (e.g., "Clothing", "Books", "Home Goods") are removed from the "Product Category" radio button field.
Example 3: Preparing a "Survey Question" radio button for new input
In a survey application, after a user completes one section, you might want to prepare the next section's questions. If a radio button field for a "Yes/No" question was used in the previous section and needs to be reused for a different question in the next section, clearing its choices ensures it's ready for new options to be added.
- Inputs:
- UI element:
Question 5 Answer(a radio button field)
- UI element:
- Result: The "Yes" and "No" choices are removed from the "Question 5 Answer" radio button field, leaving it blank and ready for new choices.