© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
40 replies
Renzo

Hide a Toggle field depending on Select option

For some reason, I can't make it work. Here's what I did:

Select::make('roles')
->relationship('roles', 'name')
->live(),
Toggle::make('is_admin')
->hidden(fn ($record) => !$record->roles->pluck('name')->contains('Vendor'))
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

show/hide field depending on data load?
FilamentFFilament / ❓┊help
3y ago
Force select value based on a toggle option
FilamentFFilament / ❓┊help
11mo ago
How to hide/show a text field depending on the selected value in the select field?
FilamentFFilament / ❓┊help
2y ago
Showing a table below a select field depending on the selected field.
FilamentFFilament / ❓┊help
3y ago