access filter data from table action or bulk action
In a table i'm creating a bulk action with modal forms, I need to get a value from the table filter (such as from a value from a select filter) to create the modal form. How do I access these table filter values from bulk action form?
Solution:Jump to solution
Thank you, finally got it working with the following bulk action with custom form , getting the filter value and putting it inside a hidden field, then the other field which requires it using $get method:
```php
BulkAction::make('MyAction')
->mountUsing( function(Forms\ComponentContainer $form, Table $table){
$form->fill([...
3 Replies
bump
haven't tried this before, but try to inject the
Table
instance https://filamentphp.com/docs/3.x/tables/filters/getting-started#table-filter-utility-injection where ever you are calling the actionSolution
Thank you, finally got it working with the following bulk action with custom form , getting the filter value and putting it inside a hidden field, then the other field which requires it using $get method: