© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Andi

Accessing form data in suffixAction form.

Hi guys
I'm currently trying to access data from the parent form in the suffixActions form.
Here's my code:
public function form(Form $form): Form
    {
        return $form
            ->schema([
              Forms\Components\Select::make('part')
                ->reactive()
                ->suffixAction(
                    Action::make('add')
                            ->action(function (array $data, Forms\Get $get) {
                                $get('part'); // returns correct value
                            })
                            ->form([
                                Forms\Components\Select::make('bom')
                                    ->live()
                                    ->options(function (Forms\Get $get, $state) use () {
                                        $get('part'); // is null
                                    })
                            ])
                    )
public function form(Form $form): Form
    {
        return $form
            ->schema([
              Forms\Components\Select::make('part')
                ->reactive()
                ->suffixAction(
                    Action::make('add')
                            ->action(function (array $data, Forms\Get $get) {
                                $get('part'); // returns correct value
                            })
                            ->form([
                                Forms\Components\Select::make('bom')
                                    ->live()
                                    ->options(function (Forms\Get $get, $state) use () {
                                        $get('part'); // is null
                                    })
                            ])
                    )

So in action() I receive the correct value, in options I don't.

Thanks for your help.
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

Accessing relationship data in form lifecycle hook
FilamentFFilament / ❓┊help
13mo ago
Accessing data in ViewFiled
FilamentFFilament / ❓┊help
3y ago
Accessing Form State
FilamentFFilament / ❓┊help
3y ago
Accessing repeater data
FilamentFFilament / ❓┊help
3y ago