F
Filament3w ago
Vp

section footer action to submit the section schema

How can I make section footer Action to submit the section schema form? docs links: https://filamentphp.com/docs/3.x/forms/layout/section#adding-actions-to-the-sections-footer I create a page filament-page and added custom multiple form (https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#using-multiple-forms) I want to submit the section form by using the section footer action, how can I achieve this? Code:
return $form
->schema([
Forms\Components\Section::make('test')
->aside()
->schema([
Forms\Components\TextInput::make('title'),
])
->footerActions([
Forms\Components\Actions\Action::make('save') // how can I make this action to submit section schema
->action(function (array $data) {
dd($data);
}),
]),
])
return $form
->schema([
Forms\Components\Section::make('test')
->aside()
->schema([
Forms\Components\TextInput::make('title'),
])
->footerActions([
Forms\Components\Actions\Action::make('save') // how can I make this action to submit section schema
->action(function (array $data) {
dd($data);
}),
]),
])
Solution:
I've created a custom button instead of footer action and closing this as completed
Jump to solution
3 Replies
LeandroFerreira
Do you have two forms in the blade? Shoudn't you submit the whole form?
Vp
Vp3w ago
Yes, I am going to have (more than) two forms in blade, and still I am in experimental stage, probably I want to submit individually (not whole form at once) My example is inside one form like
public function editPostForm(Form $form): Form
{
return $form
// ... my example goes here
}
public function editPostForm(Form $form): Form
{
return $form
// ... my example goes here
}
Solution
Vp
Vp3w ago
I've created a custom button instead of footer action and closing this as completed