© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
57 replies
Dorin

Use Action inside a custom field

Hello, i have a error in my custom field, because i have 2 form submit buttons.
Field:
class ObjectPaymentFunction extends Field
{
  protected string $view = 'forms.components.custom-field';
}
class ObjectPaymentFunction extends Field
{
  protected string $view = 'forms.components.custom-field';
}


forms.components.custom-field.blade.php:
<x-dynamic-component
    :component="$getFieldWrapperView()"
    :field="$field"
>
  <div>
    {{ $this->billCreatedAction() }}
    <x-filament-actions::modals />
  </div>
</x-dynamic-component>
<x-dynamic-component
    :component="$getFieldWrapperView()"
    :field="$field"
>
  <div>
    {{ $this->billCreatedAction() }}
    <x-filament-actions::modals />
  </div>
</x-dynamic-component>


EditCustomer:
class EditCustomer extends EditRecord
{
  public function billCreatedAction(): Action
    {
        return Action::make('billCreated')
            ->label('Close')
            ->requiresConfirmation()
            ->action(function () {
                dd('billAction');
            });
    }
}
class EditCustomer extends EditRecord
{
  public function billCreatedAction(): Action
    {
        return Action::make('billCreated')
            ->label('Close')
            ->requiresConfirmation()
            ->action(function () {
                dd('billAction');
            });
    }
}


The error:
The action is shown correctly, also the modal is asking for confirmation.
But on confimation the save Button in the backgound on the create page is triggered. And the record is saved. But the modal is still open.

Is there a way to separate the "confimation form" on the edit page?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Action inside a custom widget
FilamentFFilament / ❓┊help
3y ago
Validating additional fields inside a custom form field
FilamentFFilament / ❓┊help
3y ago
Use Filament Components inside custom Form Field?
FilamentFFilament / ❓┊help
3y ago
Table inside custom field
FilamentFFilament / ❓┊help
6mo ago