Conditionally disabling form fields

Hi all!

I'm a beginner in Laravel and quite new on Filament, and I'm trying to conditionally disable some form fields on certain conditions.

I've been using the ->disabledOn() method in form fields to disable them on edit page or create page, for example, but I now need to disable a FileUpload form in the Edit view only if it already has a file, and I have no clue of how to do this. Any push in the right direction would be a bless.

I'm using Spatie Media Library and Shield Plugins (Maybe in the near future I have to conditionally disable a form field based on the user role)

Thanks in advance!
Was this page helpful?