Get current step
Function: Get current step
This action allows you to identify which step of a multi-step form (often called a "Stepper") is currently active or open. It's useful for tracking user progress, enabling conditional logic, or displaying specific information based on the user's current position in a process.
Input,
- Stepper UI element: This is the specific Stepper component on your page that you want to check. You must select the Stepper element from your application's user interface.
Output,
- Result: The name of a variable where the unique numerical identifier (code) of the currently active step will be stored. By default, this variable is named "CURRENT_STEP".
Execution Flow,
Real-Life Examples,
Example 1: Tracking User Onboarding Progress
Imagine you have a user onboarding process with several steps (e.g., "Profile Info", "Payment Details", "Review"). You want to know which step the user is currently on to update a progress bar or display a specific message.
- Inputs:
- Stepper UI element:
OnboardingStepper(the name of your Stepper component) - Result:
OnboardingStepNumber
- Stepper UI element:
- Result: If the user is on the "Payment Details" step, the variable
OnboardingStepNumberwill store its unique numerical identifier, for example,2.
Example 2: Conditional Display Based on Current Step
You have a multi-step application form, and you want to show a "Save Draft" button only when the user is past the initial "Contact Information" step.
- Inputs:
- Stepper UI element:
ApplicationFormStepper - Result:
CurrentFormStep
- Stepper UI element:
- Result: If the user is on the "Education History" step, the variable
CurrentFormStepmight store3. You can then use a condition likeCurrentFormStep > 1to display the "Save Draft" button.
Example 3: Logging User Journey for Analytics
For analytical purposes, you want to log every time a user lands on a new step in a complex workflow, such as an order customization process.
- Inputs:
- Stepper UI element:
OrderCustomizationStepper - Result:
CustomizationStepID
- Stepper UI element:
- Result: When a user navigates to the "Choose Accessories" step, the variable
CustomizationStepIDwill store its numerical identifier, for example,4. This value can then be sent to your analytics tool.