F
Filamentβ€’11mo 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β€’11mo 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
chrispage1OPβ€’11mo 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
chrispage1OPβ€’11mo ago
No description
Want results from more Discord servers?
Add your server