© 2026 Hedgehog Software, LLC

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

Replicate action: load form instead of save

I was searching for a way to add Clone table action, and came across Replicate action. The only difference between what I want and what this action offers is that, instead of saving the record directly, I want it to be loaded in the form instead, to be saved as a new record when Save button is clicked.

Is there a way to do this with Replicate action, or is there some other action to achieve this? I'm looking for a Save As action to be precise.
Solution
Managed via the following code:
                    Tables\Actions\CreateAction::make('Duplicate')
                        ->label('Duplicate')
                        ->icon('heroicon-o-document-duplicate')
                        ->form(fn (Form $form) => static::form($form->model(static::$model))->columns(2))
                        ->fillForm(fn ($record) => $record->toArray()),
                    Tables\Actions\CreateAction::make('Duplicate')
                        ->label('Duplicate')
                        ->icon('heroicon-o-document-duplicate')
                        ->form(fn (Form $form) => static::form($form->model(static::$model))->columns(2))
                        ->fillForm(fn ($record) => $record->toArray()),
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Form action - save and load next record -
FilamentFFilament / ❓┊help
2y ago
Replicate - but display form instead of saving directly.
FilamentFFilament / ❓┊help
6mo ago
Replicate action
FilamentFFilament / ❓┊help
2y ago
Can't save form action
FilamentFFilament / ❓┊help
2y ago