© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago
Jappi00

Dynamic Wizard Step

Hello together,

I have a problem and no idea how i can solve it. Basically I currently using this https://filamentphp.com/docs/3.x/forms/advanced#dynamic-fields-based-on-a-select-option to show different forms based on an select and fill an json field with this data. Now I want to apply the same method to wizards to add a dynamic schema to an wizard step. I'am currently getting this error Call to a member function getChildComponentContainer() on null. I think it does not find the getComponent because it is not in the scope of the first step.

The getSteps function looks like this:

protected function getSteps(): array

    {

        return [

            Step::make('General')

                ->description('Configure general informations')

                ->schema([

                    Select::make('template_id')

                        ->required()

                        ->relationship('template', 'name')

                        ->live()

                        ->afterStateUpdated(fn (Select $component) => $component

                            ->getContainer()

                            ->getComponent('dynamicService')

                            ->getChildComponentContainer()

                            ->fill()

                        ),

                ]),

            Step::make('Service')

                ->description('Configure service informations')

                ->schema(fn (Get $get): array => $get('template_id') ? \Aura::getServiceByKey(Template::find($get('template_id')))::getTemplateForm() : [])

                ->key('dynamicService')

        ];

    }
protected function getSteps(): array

    {

        return [

            Step::make('General')

                ->description('Configure general informations')

                ->schema([

                    Select::make('template_id')

                        ->required()

                        ->relationship('template', 'name')

                        ->live()

                        ->afterStateUpdated(fn (Select $component) => $component

                            ->getContainer()

                            ->getComponent('dynamicService')

                            ->getChildComponentContainer()

                            ->fill()

                        ),

                ]),

            Step::make('Service')

                ->description('Configure service informations')

                ->schema(fn (Get $get): array => $get('template_id') ? \Aura::getServiceByKey(Template::find($get('template_id')))::getTemplateForm() : [])

                ->key('dynamicService')

        ];

    }
Advanced forms - Form Builder - Filament
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Dynamic Wizard
FilamentFFilament / ❓┊help
3y ago
wizard step label
FilamentFFilament / ❓┊help
8mo ago
Polling step wizard
FilamentFFilament / ❓┊help
16mo ago
Completed Wizard step
FilamentFFilament / ❓┊help
2y ago