© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
Daniel

Fill form data via emitted action

Is it possible to fill form data via an emitted action?

I do have an action:

Action::make('apply')
    ->action(function ($record) {
        $this->emit('applySelection', $record);
    }),
Action::make('apply')
    ->action(function ($record) {
        $this->emit('applySelection', $record);
    }),


which should do the following:

public function applySelection($record): void
{
    $formData = $this->form->getState();
    $this->form->fill($record);
}
public function applySelection($record): void
{
    $formData = $this->form->getState();
    $this->form->fill($record);
}


but it seems like the form always get submitted instead of filling in the data in the corresponding fields.
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

Fill Form Data
FilamentFFilament / ❓┊help
3y ago
Action to Fill New Record Form with Old Data
FilamentFFilament / ❓┊help
3y ago
mutate form data before fill
FilamentFFilament / ❓┊help
3y ago
Persist Action Form Data
FilamentFFilament / ❓┊help
3y ago