© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
22 replies
nowak

How to add a CreateAction in the headerActions of resource A, to create a record in resource B?

I want to allow users to easily create a record in resource B, on the List page of resource A in its tables headerActions. I would also prefer to use the existing form from resource B as well as it's create lifecycle hooks, if possible. Basically, I want to open the existing create page of resource B in a modal by clicking an action button, which does the exact same as the existing create page does.
Is this possible?

I tried to use Filament\Actions\CreateAction on a tables headerActions just to test if this would open a create modal when clicked like this:
->headerActions([
  \Filament\Actions\CreateAction::make()
    ->model(UserOrder::class)
    ->form([
      TextInput::make('status_id')
        ->required()
        ->maxLength(255),
      // ...
    ]),
]);
->headerActions([
  \Filament\Actions\CreateAction::make()
    ->model(UserOrder::class)
    ->form([
      TextInput::make('status_id')
        ->required()
        ->maxLength(255),
      // ...
    ]),
]);

But this gives this error:
Method Filament\Actions\CreateAction::table does not exist.
Method Filament\Actions\CreateAction::table does not exist.
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

CreateAction in RelationManager's headerActions go to the resource create page instead of modal
FilamentFFilament / ❓┊help
3y ago
How to include a different resource CreateAction in resource CreateAction?
FilamentFFilament / ❓┊help
2y ago
How to move CreateAction inside HeaderActions
FilamentFFilament / ❓┊help
16mo ago
How to use CreateAction for a resource in an unrelated resources table headerActions?
FilamentFFilament / ❓┊help
16mo ago