Set value of slider field
Function: Set value of slider field
This action allows you to programmatically update the value of a slider component on your form. Instead of a user manually dragging the slider, you can use this action to set its value to a specific number, which can be useful for pre-filling forms, adjusting settings based on other data, or automating interactions. Once set, this new value is available for other actions to use.
Input
- UI element (Slider Field): This is the specific slider component on your form that you want to modify. You must select an existing slider field from your application's design.
- Answer (Number): This is the numerical value you want to set the slider to. This value should typically fall within the minimum and maximum range defined for your slider field.
Output
This action does not produce a direct output that you can immediately use in a subsequent step. Instead, its effect is to update the selected slider field's value internally within your application. This updated value can then be accessed or used by other actions or components that interact with that specific slider field.
Execution Flow
Real-Life Examples
Here are some examples of how you might use the "Set value of slider field" action:
-
Pre-filling a product quantity:
- Scenario: You have an online store where customers can add products to their cart. When a customer clicks "Add to Cart" for a specific product, you want to automatically set the quantity slider on the product detail page to a default of "1".
- Inputs:
- UI element (Slider Field):
Product Quantity Slider - Answer (Number):
1
- UI element (Slider Field):
- Result: The "Product Quantity Slider" on the page will automatically display "1", ready for the user to adjust if needed.
-
Applying a dynamic discount:
- Scenario: Based on a customer's loyalty status, you want to automatically adjust a "Discount Percentage" slider on an order form. If they are a "Gold" member, the discount should be 15%.
- Inputs:
- UI element (Slider Field):
Discount Percentage Slider - Answer (Number):
15
- UI element (Slider Field):
- Result: The "Discount Percentage Slider" on the order form will be set to "15%", reflecting the Gold member discount.
-
Resetting a rating scale:
- Scenario: After a user submits a feedback form, you want to clear or reset all the rating sliders (e.g., "Service Quality", "Product Satisfaction") back to their default or minimum value (e.g., 0 or 1) for the next submission.
- Inputs:
- UI element (Slider Field):
Service Quality Rating Slider - Answer (Number):
0
- UI element (Slider Field):
- Result: The "Service Quality Rating Slider" will be reset to "0", preparing the form for new input. (You would repeat this for other rating sliders).