© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
15 replies
Jamie Cee

Hiding multi-select options but only on edit - using relationships

                Fieldset::make('Roles')
                    ->schema([
                        Forms\Components\Select::make('roles')
                            ->label('')
                            ->multiple()
                            ->relationship('roles', 'name')
                            ->preload()
                            ->required(),
                    ])
                    ->columns(1),
                Fieldset::make('Roles')
                    ->schema([
                        Forms\Components\Select::make('roles')
                            ->label('')
                            ->multiple()
                            ->relationship('roles', 'name')
                            ->preload()
                            ->required(),
                    ])
                    ->columns(1),


I have the above, however. WHen it comes to editing, I want to hide the "admin" role if the record user is the same as the authenticated user (This is to prevent an admin from removing the admin role from themselves) but still allow them to give/take other roles from the system
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

Set select options edit
FilamentFFilament / ❓┊help
3y ago
Edit on a form Select with options
FilamentFFilament / ❓┊help
3y ago
Linking Multi relationships
FilamentFFilament / ❓┊help
2y ago
Multiple Select on Managing relationships
FilamentFFilament / ❓┊help
3y ago