F
Filament17mo ago
darwin

Custom page with action

is there any way we could move the Actions on the bottom of the form instead of the heading?
6 Replies
LeandroFerreira
LeandroFerreira17mo ago
form actions?
darwin
darwinOP17mo ago
yes, i made a custom page and i added a form, but the getAction method puts the button on the page heading instead on the bottom of the form i was wondering if we could place it on the bottom
LeandroFerreira
LeandroFerreira17mo ago
protected function getFormActions(): array
{
return [
Action::make('custom_action')
->action(...)
];
}
protected function getFormActions(): array
{
return [
Action::make('custom_action')
->action(...)
];
}
darwin
darwinOP17mo ago
hmm okay2 thanks imma try using that hello i tried this one and rendered it on my blade file, but the actions i added doesnt seem to work anymore
<x-filament::page>
<x-filament::form wire:submit.prevent="save">
{{ $this->form }}

<x-filament::form.actions :actions="$this->getFormActions()" />
</x-filament::form>

</x-filament::page>
<x-filament::page>
<x-filament::form wire:submit.prevent="save">
{{ $this->form }}

<x-filament::form.actions :actions="$this->getFormActions()" />
</x-filament::form>

</x-filament::page>
this is the code in my blade file
LeandroFerreira
LeandroFerreira17mo ago
if you are using a custom page, you can follow this section https://filamentphp.com/docs/2.x/forms/getting-started#preparing-your-livewire-component
<x-filament::form wire:submit.prevent="submit">
{{ $this->form }}
<x-filament::button type="submit">Submit</x-filament::button>
</x-filament::form>
<x-filament::form wire:submit.prevent="submit">
{{ $this->form }}
<x-filament::button type="submit">Submit</x-filament::button>
</x-filament::form>
Filament
Getting started - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
darwin
darwinOP17mo ago
okay thank you!
Want results from more Discord servers?
Add your server