Get value of Check box field
Function: Get value of Check box field
This action helps you retrieve the choices a user has selected in a Checkbox UI element on your form. It gathers the unique codes of all selected options and stores them as a list of text values in a variable, ready for you to use in other parts of your application.
Input
- UI element
- Description: This is the specific Checkbox UI element on your form from which you want to get the selected answers.
- Type: UI element (specifically a "checkbox-field")
- Required: Yes
Output
- Answer
- Description: This is the name of the variable where the list of selected choices (as text values) will be stored. If no choices are selected, the variable will contain an empty list.
- Type: List of Text
- Default Value:
CHECKBOX_FIELD_ANSWER
Execution Flow
Real-Life Examples
Example 1: Capturing User Preferences
Imagine you have a form where users can select their preferred communication methods (Email, SMS, Phone).
- Inputs:
- UI element:
Communication_Preferences_Checkbox(This is the checkbox field on your form) - Answer:
User_Communication_Choices
- UI element:
- Result: If the user selects "Email" and "SMS", the variable
User_Communication_Choiceswill contain a list like["EMAIL", "SMS"]. You can then use this list to send notifications through the chosen channels.
Example 2: Validating Agreement to Terms
You have a form with a checkbox for users to agree to your terms and conditions before submitting.
- Inputs:
- UI element:
Terms_And_Conditions_Checkbox - Answer:
Agreed_To_Terms
- UI element:
- Result: If the user checks the box, the variable
Agreed_To_Termswill contain["AGREED"]. If they don't check it, the variable will be an empty list[]. You can then use a condition to check ifAgreed_To_Termsis not empty before allowing form submission.
Example 3: Filtering Product Options
On an e-commerce site, users can select multiple features for a product (e.g., "Wi-Fi", "Bluetooth", "GPS").
- Inputs:
- UI element:
Product_Features_Checkbox - Answer:
Selected_Product_Features
- UI element:
- Result: If the user selects "Wi-Fi" and "GPS", the variable
Selected_Product_Featureswill contain["WIFI", "GPS"]. This list can then be used to dynamically display product details or filter available products based on the chosen features.