© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
11 replies
Mark Chaney

Form Wizard and Dynamic Fill?

Radio::make('moveOrMerge')
    ->options([
        'move' => 'Move',
        'merge' => 'Merge',
    ])
    ->required(),
Select::make('merge_target')
    ->options(function () use ($table) {
        if (isset($this->target_tenant_options)) {
            return $this->target_tenant_options[$table] ?? [];
        }

        return [];
    })
    ->required(function (Get $get) {
        if ($get('moveOrMerge') === 'merge') {
            return true;
        }

        return false;
    }),
Radio::make('moveOrMerge')
    ->options([
        'move' => 'Move',
        'merge' => 'Merge',
    ])
    ->required(),
Select::make('merge_target')
    ->options(function () use ($table) {
        if (isset($this->target_tenant_options)) {
            return $this->target_tenant_options[$table] ?? [];
        }

        return [];
    })
    ->required(function (Get $get) {
        if ($get('moveOrMerge') === 'merge') {
            return true;
        }

        return false;
    }),
why does something simple like this on a required() logic create
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
? I even get this error when I am on step 1 of the wizard and this field is in step 2
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

Dynamic Wizard
FilamentFFilament / ❓┊help
3y ago
Dynamic Wizard Step
FilamentFFilament / ❓┊help
3y ago
Form Wizard with dynamic enabled/disabled submit button
FilamentFFilament / ❓┊help
3y ago
Fill Form Data
FilamentFFilament / ❓┊help
3y ago