© 2026 Hedgehog Software, LLC

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

Set formData on an Infolist action form

I have the following infolist action form (excerpt)

TextEntry::make('user.details')
    ->suffixActions([
      Action::make('editDetails')
            ->form([
                TextInput::make('name'),
                Select::make('title')
            ])
            ->formData([]) // Cant set this
            ->action(function (array $data, $record) {
                $record->details()->update($data);
            }),
    ])
TextEntry::make('user.details')
    ->suffixActions([
      Action::make('editDetails')
            ->form([
                TextInput::make('name'),
                Select::make('title')
            ])
            ->formData([]) // Cant set this
            ->action(function (array $data, $record) {
                $record->details()->update($data);
            }),
    ])

How can I pre-fill this form? I tried doing the following

$details = $this->getRecord()->details->attributesToArray();

...

->formData($details)
$details = $this->getRecord()->details->attributesToArray();

...

->formData($details)


but it doesn't work.

Is this possible? Am I doing something wrong?
Solution
Nvm, I'm an idiot. There's a
->fillForm
->fillForm
method that does what I want.
Jump to solution
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

Getting an error when using infolist() on Infolist\Action
FilamentFFilament / ❓┊help
12mo ago
Set the title of an action form
FilamentFFilament / ❓┊help
2y ago
$set on modal form hint action
FilamentFFilament / ❓┊help
13mo ago
Using an Infolist-Action with another infolist in it.
FilamentFFilament / ❓┊help
2y ago