© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
14 replies
pocket.racer

Is there a way to get current step number in Form Wizard?

I have the following piece of code

Wizard::make($steps)
                ->columnSpanFull()
                ->nextAction(function (Action $action): void {
                    $action
                        ->label('Continue');
                });
Wizard::make($steps)
                ->columnSpanFull()
                ->nextAction(function (Action $action): void {
                    $action
                        ->label('Continue');
                });


I want to make it such that I can do something like this (Continue button to be full width if it is the 1st step)

Wizard::make($steps)
                ->columnSpanFull()
                ->nextAction(function (Action $action): void {
                    $action
                        ->label('Continue');
                     // how to get current step number here
                     if ($currentStepNumber === 1) {
                          // w-full doesn't work too
                          $action->extraAttributes(['class' => 'w-full']);
                     }
                });
Wizard::make($steps)
                ->columnSpanFull()
                ->nextAction(function (Action $action): void {
                    $action
                        ->label('Continue');
                     // how to get current step number here
                     if ($currentStepNumber === 1) {
                          // w-full doesn't work too
                          $action->extraAttributes(['class' => 'w-full']);
                     }
                });


I tried to inject Component $livewire to the ->nextAction() method but it I got error as it is injecting the parent livewire component, not the form wizard livewire component
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Get Current Step on Wizard
FilamentFFilament / ❓┊help
3y ago
$get() in Wizard Form is null
FilamentFFilament / ❓┊help
2y ago
Is there a way to get the current tenant in isTenantSubscriptionRequired()?
FilamentFFilament / ❓┊help
3y ago
Wizard step afterValidation get only form fields of that step only
FilamentFFilament / ❓┊help
12mo ago