© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
4 replies
BKF Dev

Hide Input Form inside Repeater based on condition

Hello,
I want to hide a select input if the line record exist, (Order has many items), I'm trying this code :

Repeater::make('lines')                            
    ->relationship()                           
    ->schema([
...
Forms\Components\Select::make('product_id')       
    ->relationship('product', 'name')
    ->visible(fn(?Model $record) => !$record)
...

Repeater::make('lines')                            
    ->relationship()                           
    ->schema([
...
Forms\Components\Select::make('product_id')       
    ->relationship('product', 'name')
    ->visible(fn(?Model $record) => !$record)
...

But I get this error :
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization


Is there a way to manage this ? thanks
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

hide Tabs based on condition
FilamentFFilament / ❓┊help
3y ago
Repeater based on user input
FilamentFFilament / ❓┊help
3y ago
Hide RelationManager card based on certain condition
FilamentFFilament / ❓┊help
3y ago
Hide Text Form Input based on Selected Data from other Form Components
FilamentFFilament / ❓┊help
3y ago