© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•4mo ago•
1 reply
Mikavdwiel

Custom Action on section with relation not doing anything

First some background information... I have a model that references another of the same model. This is editable in fillament by storing the schema components in a seperate function and then imported in both the main schema, and a section schema with a relation. This works great!

Now i wish to create a custom action to copy the form data from the current form into the relations form. So i added an action on the section to copy the form data into the relationship form. This however does nothing at all...

When i click the action it does load, it does send a request over the network but nothing happens. I added a notification for troubleshooting, and it never shows... However, as soon as i remove the ->relationship from the section, the action does trigger.

Any suggestions?

public static function configure(Schema $schema): Schema
    {
        return $schema
            ->schema([
                ...self::getComponents($schema),
                Section::make('Paired connector')
                    ->columnSpanFull()
                    ->collapsible()
                    ->collapsed()
                    ->relationship('pairedConnector', fn(?array $state) => filled($state['name']))
                    ->schema([
                        ...self::getComponents($schema, false),
                    ])
                    ->headerActions([
                        Action::make('copyFormContent')
                            ->label('Copy Form Content')
                            ->icon('heroicon-m-sparkles')
                            ->action(function (Set $set, Get $get) {

                                // Send a notification to prove it's firing
                                Notification::make()
                                    ->title('Action is working!')
                                    ->success()
                                    ->send();
                            }),
                    ]),
            ]);
    }
public static function configure(Schema $schema): Schema
    {
        return $schema
            ->schema([
                ...self::getComponents($schema),
                Section::make('Paired connector')
                    ->columnSpanFull()
                    ->collapsible()
                    ->collapsed()
                    ->relationship('pairedConnector', fn(?array $state) => filled($state['name']))
                    ->schema([
                        ...self::getComponents($schema, false),
                    ])
                    ->headerActions([
                        Action::make('copyFormContent')
                            ->label('Copy Form Content')
                            ->icon('heroicon-m-sparkles')
                            ->action(function (Set $set, Get $get) {

                                // Send a notification to prove it's firing
                                Notification::make()
                                    ->title('Action is working!')
                                    ->success()
                                    ->send();
                            }),
                    ]),
            ]);
    }
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 not doing anything
FilamentFFilament / ❓┊help
3y ago
Custom Action from Relation Manager
FilamentFFilament / ❓┊help
2y ago
Custom action in relation manager
FilamentFFilament / ❓┊help
3y ago
Edit action not working on relation manager
FilamentFFilament / ❓┊help
3y ago