F
Filament14mo ago
jey

show hidden fields conditionaly not working

as title says
Forms\Components\Checkbox::make('availability')->default(true),
Forms\Components\DatePicker::make('from')->hidden(fn(Get $get)=> $get('availability') === false),
Forms\Components\DatePicker::make('to')->hidden(fn(Get $get)=> $get('availability') === false),
Forms\Components\Checkbox::make('availability')->default(true),
Forms\Components\DatePicker::make('from')->hidden(fn(Get $get)=> $get('availability') === false),
Forms\Components\DatePicker::make('to')->hidden(fn(Get $get)=> $get('availability') === false),
2 Replies
Dan Harrin
Dan Harrin14mo ago
missing live() on the checkbox
jey
jeyOP14mo ago
i did try it with live() before posting it here but it didn't work but it turns out i had a typo after going back to the code thanks
Want results from more Discord servers?
Add your server