I have a Filament Resource with a Bulk Action with modal confirm, and i have a form there to add some values for selected records. How i can access to the values of this form in action method?
<?php
$table->bulkActions([
\Filament\Tables\Actions\BulkAction::make('my_action')
->requiresConfirmation()
->form(function (Collection $records) {
\Filament\Forms\Components\TextInput::make('name')
})
->action(function (Collection $records) {
//i need a value of form TextInput [name] here
});
]);
Just now i found the answer how to get form data/values from modal: via table
Livewireobject. Use$table->getLivewire()->getMountedTableBulkActionForm()->getState().Somewhere in your Filament Resource:
Hope that helps.