© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Gudao

Edit Page not showing Hidden Field

I am encountering this problem with a Conditional Select Field where if the role of the user is Vendor, another section appears but if it is defaulted as Vendor in Edit User, it is not visible and you have to reselect it to Vendor for it to reappear. How can I fix this?

return $form
->schema([
Group::make()
->schema([
Section::make()
->schema([
TextInput::make('name')->label('Full Name'),
TextInput::make('email')->label('Email'),
TextInput::make('password')->label('Password')
->password()
->dehydrateStateUsing(fn (string $state): string => Hash::make($state))
->dehydrated(fn (?string $state): bool => filled($state)),
Select::make('roles')
->native(false)
->relationship('roles', 'name')
->live(),
]),
Section::make()
->schema([
TextInput::make('user_rate')->label('Rate')
->numeric(),
TextInput::make('user_distance_rate')->label('Rate Per Distance')
->numeric(),
Toggle::make('user_preferred')->label('Preferred'),
])
->hidden(fn (Get $get): bool => $get('roles') != 2) //2 is the id of Vendor role
]),

Here is the code for context
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

Image not showing on Edit Page
FilamentFFilament / ❓┊help
2y ago
Hidden field works only while create and not edit
FilamentFFilament / ❓┊help
2y ago
hidden field depends on current page
FilamentFFilament / ❓┊help
2y ago
field disabled on the edit page and hidden on the create new record page
FilamentFFilament / ❓┊help
3y ago