Disable Input (or anything else) based on a select option

Hello, I'm new to filament, and I would like to know if it is possible for me to generate a section based on a user option, and I can change the form based on that option, is it possible? example:
Select::make('test')->options([
1 => 'First',
2 => 'Second'
])->afterUpdateState(function($state){
switch($state) {
case 1:
Section::make('...')
break;

case 2:
Section::make('...')
break;
}
})
Select::make('test')->options([
1 => 'First',
2 => 'Second'
])->afterUpdateState(function($state){
switch($state) {
case 1:
Section::make('...')
break;

case 2:
Section::make('...')
break;
}
})
1 Reply
Want results from more Discord servers?
Add your server