FilamentF
Filament3y ago
dyo

get form data in after() method

How can i get form data in after() in CreateAction class?
i'm using modal form..

i have a code something like this

Tables\Actions\CreateAction::make()
    ->mutateFormDataUsing(function (array $data) {
        unset($data['setoran_id']);

        return $data;
    })->after(function (array $data) {
        // I want to use $data['setoran_id'] in here..
    }),
Solution
got it,

i'm using $livewire->mountedTableActionData to get the forms value in after()..

thanks for @awcodes and @Leandro Ferreira for trying to help me..
Was this page helpful?