© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
9 replies
vahnmarty

How to customize Repeater form events?

I've read the documentation found on https://filamentphp.com/docs/2.x/forms/advanced#using-form-events but I don't understand any single thing.

I don't understand how to implement this:

protected function setUp(): void
{
    parent::setUp();
 
    $this->registerListeners([
        'repeater::deleteItem' => [
            function (Component $component, string $statePath, string $uuidToDelete): void {
                if ($component->isDisabled()) {
                    return;
                }
 
                if ($statePath !== $component->getStatePath()) {
                    return;
                }
 
                // Delete item with UUID `$uuidToDelete`
            },
        ],
    ]);
}
protected function setUp(): void
{
    parent::setUp();
 
    $this->registerListeners([
        'repeater::deleteItem' => [
            function (Component $component, string $statePath, string $uuidToDelete): void {
                if ($component->isDisabled()) {
                    return;
                }
 
                if ($statePath !== $component->getStatePath()) {
                    return;
                }
 
                // Delete item with UUID `$uuidToDelete`
            },
        ],
    ]);
}
Filament
Advanced - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
Advanced - Form Builder - Filament
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

Similar Threads

How to customize repeater delete Item?
FilamentFFilament / ❓┊help
3y ago
How to listen to dispatch events in form?
FilamentFFilament / ❓┊help
3y ago
How to customize
FilamentFFilament / ❓┊help
10mo ago
Form Repeater Validation
FilamentFFilament / ❓┊help
12mo ago