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'
  ),
Was this page helpful?