F
Filament17mo ago

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 Harrin17mo ago
missing live() on the checkbox
卵
OP17mo 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

Did you find this page helpful?