How to get Field component data/config in Form Action

Can we get the field component data or the configurations in the mounted form action?
Forms\Components\FileUpload::make('image')
->disk('public')
->directory('posts/featured-images')
->hintAction(
Action::make('custom_action')
->action(function () {
// get the disk and directory from the field
})
),
Forms\Components\FileUpload::make('image')
->disk('public')
->directory('posts/featured-images')
->hintAction(
Action::make('custom_action')
->action(function () {
// get the disk and directory from the field
})
),
Solution:
https://discord.com/channels/883083792112300104/1217509330090459206/1218514696144031794 Just learned form Ralph that we can use $component variable to get the Field itself on which the action is mounted. ...
Jump to solution
1 Reply
Solution
Mansoor Khan
Mansoor Khan9mo ago
https://discord.com/channels/883083792112300104/1217509330090459206/1218514696144031794 Just learned form Ralph that we can use $component variable to get the Field itself on which the action is mounted.
->action(function (FileUpload $component)
->action(function (FileUpload $component)
Want results from more Discord servers?
Add your server