F
Filamentβ€’6mo ago
chrispage1

Relocating create button to inside my grid structure

Hi, I'd like to relocate the create buttons to inside my schema. Is there an easy way that I can do this? See attached how it currently looks. I'd like the create buttons to sit inside of 'Publish information', a bit like WordPress looks. I've also attached my current schema. Thanks!
3 Replies
LeandroFerreira
LeandroFerreiraβ€’6mo ago
I think you can add a custom action inside the section
Forms\Components\Actions::make([
Forms\Components\Actions\Action::make('custom_create')
->submit('create')
])
Forms\Components\Actions::make([
Forms\Components\Actions\Action::make('custom_create')
->submit('create')
])
You can use $operation to show/hide the action by page
->visible(fn ($operation): bool => $operation === 'create')
->visible(fn ($operation): bool => $operation === 'create')
chrispage1
chrispage1β€’6mo ago
@Leandro Ferreira that's brilliant thank you! I've done that and added
protected function getFormActions(): array
{
return [];
}
protected function getFormActions(): array
{
return [];
}
to remove the actions on Create & Edit. Both working nicely πŸ˜„
chrispage1
chrispage1β€’6mo ago
No description