FilamentF
Filament14mo ago
Kenneth

"Create & Create another" doesn't work on custom action

I debugged it this far and concluded it only closes my modal when a custom action is used. All non-custom action creates work and leaves the modal open.

My code:
return CreateAction::make()
    ->form([
        TextInput::make('email')
            ->label(__('form_fields.email'))
            ->email()
            ->maxLength(255)
            ->required(),

        TextInput::make('password')
            ->password()
            ->label(__('form_fields.password'))
            ->maxLength(255)
            ->required(),
    ])
    ->action(function (CreateAction $action, array $data) {
        try {
            ...
        } catch (Exception $exception) {
            ... 
        }
    });


I've tried a hard createAnother function call within ->action() itself and between ->form() and ->action(), but nothing seems to work. I'm out of ideas and I'm in an infinte loop with Phind and ChatGPT.

I'm using Filament v3
Was this page helpful?