© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
Patrick

Can't dynamicly show or hide fields in a repeater

I have a form with a select:
Select::make('course')
                        ->label('Cursus/opleiding')
                        ->reactive()
                        ->options(Course::all()->pluck('name', 'id')->toArray())
                        ->required()
Select::make('course')
                        ->label('Cursus/opleiding')
                        ->reactive()
                        ->options(Course::all()->pluck('name', 'id')->toArray())
                        ->required()

Further in the form, i have a Repeater
            Repeater::make('schedule')
                        ->label('Planning')
                        ->reactive()                        
                        ->columns(2)
                        ->schema([
                            // other fields..
                            Select::make('course_id')
                                ->label('Cursus')
                                ->reactive()
                                ->options(Course::where('is_bundle', false)->pluck('name', 'id')->toArray())
                                ->visible(function($get){
                                    if($get('course')){
                                        return Course::find($get('course'))->is_bundle;                                        
                                    }

                                    return false;
                                })->required(),                        
                        ])
            Repeater::make('schedule')
                        ->label('Planning')
                        ->reactive()                        
                        ->columns(2)
                        ->schema([
                            // other fields..
                            Select::make('course_id')
                                ->label('Cursus')
                                ->reactive()
                                ->options(Course::where('is_bundle', false)->pluck('name', 'id')->toArray())
                                ->visible(function($get){
                                    if($get('course')){
                                        return Course::find($get('course'))->is_bundle;                                        
                                    }

                                    return false;
                                })->required(),                        
                        ])


Now when i select a course that is a bundle, the course field should be visible, but nothing shows up.
When i change the Repeater to a Grid it works just fine, but i need to be able to add multiple entries.
Solution
Shouldn't it be
$get('../../course')
$get('../../course')
?
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

How to show/hide fields inside a repeater with a reactive field in a repeater?
FilamentFFilament / ❓┊help
3y ago
Repeater: How can I conditionally show/hide Delete button in Repeater?
FilamentFFilament / ❓┊help
2y ago
Fields Repeater, can't be deleted
FilamentFFilament / ❓┊help
3y ago
Show/Hide fields based on selection
FilamentFFilament / ❓┊help
3y ago