© 2026 Hedgehog Software, LLC

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

Hide element depending of the value of another element

Hello, do you know how can I hide an element depending of the value of another ?

    private const TYPES = [
        'text' => 'Texte',
        'numeric' => 'Numérique',
        'address' => 'Adresse',
        'textarea' => 'Textarea',
        'checkbox' => 'Checkbox',
        'toggle' => 'Toggle',
        'select' => 'Liste de sélection',
    ];


Forms\Components\Select::make('type')->options(self::TYPES)->label('Type du champs')->required(),
Forms\Components\TagsInput::make('options')->separator(',')
  ->hidden(
    fn ($get): bool => $get('type') === 'Liste de sélection'
  ),
    private const TYPES = [
        'text' => 'Texte',
        'numeric' => 'Numérique',
        'address' => 'Adresse',
        'textarea' => 'Textarea',
        'checkbox' => 'Checkbox',
        'toggle' => 'Toggle',
        'select' => 'Liste de sélection',
    ];


Forms\Components\Select::make('type')->options(self::TYPES)->label('Type du champs')->required(),
Forms\Components\TagsInput::make('options')->separator(',')
  ->hidden(
    fn ($get): bool => $get('type') === 'Liste de sélection'
  ),
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 textColumn based of the value of another column
FilamentFFilament / ❓┊help
3y ago
Hide table column based on value of another column
FilamentFFilament / ❓┊help
11mo ago
Autofill an input depending on another input value
FilamentFFilament / ❓┊help
3y ago
Hide one or more elements of the getRelationsManagers array depending on the active tab.
FilamentFFilament / ❓┊help
3y ago