how to call a custom function within the action method
In v2 the following code successfully calls a custom function using the 'action' method:
However, in version 3 this code no longer works. Could you please guide me on how to call a custom function within the action method in filament v3?
Solution:Jump to solution
I think in this case the CreateAction is a redirect to the create page. You could use a custom action
```php
\Filament\Actions\Action::make('generate')
->action('fillFormFields')...
7 Replies
Is fullFormFiles custom? It should work, id you dd within the filleFormFields? you can always try self::fillFormFields but it shouldn't matter as it's just a closure
yes sir it is custom
yes sir i alredy try that .but it donot enter in filleformfields function.
->action(fn() => dd('hit'))
Can you check it's being triggered
no sir,it is not working
Solution
I think in this case the CreateAction is a redirect to the create page. You could use a custom action
ok sir
Thank you sir it works
That's basically where Im was going π Good stuff