© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
2 replies
Tii

Preset attributes according to selected tab/previously created record

I have an Event resource. I display it with tabs filtered for a type, like one tab for type "A", one for type "B" etc.
When you click on Create on the top right it should prefill the new record with the type that was previously selected as tab.

I achieved this by overwriting this method:
    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->url(fn () => route('filament.admin.resources.calendar.events.create', [
                    'type' => $this->activeTab,
                ])),
        ];
    }
    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->url(fn () => route('filament.admin.resources.calendar.events.create', [
                    'type' => $this->activeTab,
                ])),
        ];
    }


When you click on "Create and create another" it should stay that way and in addition to this I'd like to set the start_time of the next record to one week after the one that was just created.

I'm not sure how to achieve this. I'm also not sure if there is a better way for the CreateAction.
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

How list according to the tab selected in the table
FilamentFFilament / ❓┊help
2y ago
How to access attributes of a selected record, without duplicate queries?
FilamentFFilament / ❓┊help
15mo ago
Change chart type according to the selected filter
FilamentFFilament / ❓┊help
12mo ago
Select with multiple doesn't show previously selected record because they are softdeleted
FilamentFFilament / ❓┊help
16mo ago