Add radiobutton choice
Function: Add Radiobutton Choice
Add a choice to a certain radiobutton field.
This action allows you to dynamically add new options to an existing Radiobutton Field in your application's user interface. This is useful when you need to offer users a selection of choices that might change or be generated based on other data.
Input
- UI element (Type: UI element, specifically a
radiobutton-field): The specific Radiobutton Field in your application where you want to add a new choice. This is a required input. - Code of new choice (Type: A piece of text): A unique identifier for the new choice. This code is used internally to distinguish between choices and is a required input.
- Label of new choice (Type: A piece of text): The text that will be displayed to the user for this new choice. This is what users will see and click on, and it is a required input.
- Help information of new choice (Type: A piece of text): Optional additional text that provides more details or context for the choice, often displayed as a tooltip or small description.
Execution Flow
Real-Life Examples
Here are some examples of how you can use the "Add Radiobutton Choice" action:
-
Adding a new payment method option:
- Inputs:
- UI element: "Payment Method Selection" (a Radiobutton Field)
- Code of new choice:
paypal_option - Label of new choice: "PayPal"
- Help information of new choice: (empty)
- Result: The "Payment Method Selection" radio button field now includes "PayPal" as an option for users to choose.
- Inputs:
-
Dynamically adding survey answers:
- Inputs:
- UI element: "How satisfied are you?" (a Radiobutton Field)
- Code of new choice:
very_satisfied - Label of new choice: "Very Satisfied"
- Help information of new choice: "Indicates extreme happiness with our service."
- Result: The "How satisfied are you?" radio button field now includes "Very Satisfied" as an option, with a helpful tooltip for users.
- Inputs:
-
Offering different shipping speeds based on location:
- Inputs:
- UI element: "Shipping Speed Options" (a Radiobutton Field)
- Code of new choice:
next_day_air - Label of new choice: "Next-Day Air"
- Help information of new choice: "Guaranteed delivery by end of next business day."
- Result: The "Shipping Speed Options" radio button field now includes "Next-Day Air" as a selectable option, allowing users to choose faster delivery.
- Inputs: