F
Filamentβ€’9mo ago
Matheeus

Disable select by evaluating if another input value is null or not

I'm trying, on Filament V2, to disable/enable select by evaluating another input if it's nulled or not, but seems like when I populate the company_id select, the second doesn't enable. Where i'm wrong? Select::make('company_id') ->relationship('company', 'legal_name') ->searchable(['legal_name', 'vat_number']) ->preload() ->label('Azienda destinataria'), Select::make('company_contact_id') ->relationship('company_contact', 'full_name', fn (Builder $query, $get) => $query->where('company_id', $get('company_id'))) ->searchable(['name', 'surname', 'email']) ->preload() ->label('Referente aziendale') ->disabled(fn ($get) => $get('company_id') == null) ->required()]),
1 Reply
Lara Zeus
Lara Zeusβ€’9mo ago
where is live()on company_id πŸ™‚ ?
Want results from more Discord servers?
Add your server