FilamentF
Filament13mo ago
Raven

Reactive Fields

I've got two fields, purchase order and vendor. A purchase order object also has a vendor attached to it. I want it so that if the user selects a purchase order, it automatically selects the vendor and disables the field. If the purchase order gets unselected, the vendor field is cleared and enabled.
Solution
make the fileds ->live() and put the logic inside the ->disabled(fn(Get $get)=> !$get('purchase_order_id'))
Was this page helpful?