Set value of Check box field
Function: Set value of Check box field
This action allows you to select a specific option within a Checkbox UI element on your application's form. It's useful for programmatically checking a box based on conditions, user input, or pre-filling forms.
Input
- UI element: The specific Checkbox UI element on your form where you want to set an answer. This is a required input.
- Answer: The exact text value of the option you want to select within the chosen Checkbox UI element. This is also a required input and must match one of the available choices in the checkbox field.
Output
This action updates the specified Checkbox UI element by selecting the provided answer. The checkbox field on your form will reflect this selection, and its updated state will be available for any subsequent actions or display.
Execution Flow
Real-Life Examples
Example 1: Automatically selecting a preference
Imagine you have a user registration form, and based on a user's country selection, you want to automatically subscribe them to a regional newsletter.
- Inputs:
- UI element:
Newsletter_Subscriptions_Checkbox(a checkbox field with options like "Global Updates", "North America News", "Europe Digest") - Answer: "Europe Digest"
- UI element:
- Result: The "Europe Digest" option in the
Newsletter_Subscriptions_Checkboxfield will be automatically selected for the user.
Example 2: Pre-filling a form based on previous data
Consider an order form where a customer previously indicated they want gift wrapping. When they return to place a new order, you want to pre-select this option.
- Inputs:
- UI element:
Order_Options_Checkbox(a checkbox field with options like "Gift Wrapping", "Express Shipping", "Add Greeting Card") - Answer: "Gift Wrapping"
- UI element:
- Result: The "Gift Wrapping" option in the
Order_Options_Checkboxfield will be selected, making it easier for the customer to complete their order.
Example 3: Responding to a user action
Suppose you have a "Select All" button next to a list of items, each with its own checkbox. When the user clicks "Select All", you want to check a specific, important item automatically.
- Inputs:
- UI element:
Item_Selection_Checkbox(a checkbox field with options like "Item A", "Item B", "Item C", "Important Item") - Answer: "Important Item"
- UI element:
- Result: The "Important Item" option in the
Item_Selection_Checkboxfield will be selected, ensuring it's always included when the "Select All" action is triggered.