Alberto
Force select value based on a toggle option
I have a select value with three possible values (0 ,1, 2) ,next to it I've a toggle, when the toggle is true, the select value must be 2.
So on my Toggle I'm using ->reactive()->afterStateUpdated( to update the select value, and on my select I'm using disabled(fn ($get) => $get('my_toggle') === true).
The problem is that now the select values does not gets submitted, so the value is never updated. Is there a "pretty" way to do it ? As there's no readonly method on Select.
I could use a hidden field, and update it, but looks messy.
Thnx for your help!
6 replies
Combine more than one field in a Filament Resource recordTitleAttribute
Is there a way to call a function to instead reading just an attribute?
So instead of protected static ?string $recordTitleAttribute = 'title;
Using something like fn ($record) return "{$record->title} / {$record->subtitle}"
4 replies