Lindiar Miftari
Lindiar Miftari
FFilament
Created by Lindiar Miftari on 5/8/2025 in #❓┊help
Conditional createOptionForm in Filament
What I did:
Select::make('user_id')
->label('Team Owner')
->visibleOn('create')
->createOptionForm([
TextInput::make('name')
->string()
->required()
->maxLength(255),
]),
Select::make('user_id')
->label('Team Owner')
->visibleOn('edit')
Select::make('user_id')
->label('Team Owner')
->visibleOn('create')
->createOptionForm([
TextInput::make('name')
->string()
->required()
->maxLength(255),
]),
Select::make('user_id')
->label('Team Owner')
->visibleOn('edit')
Is there a method in Filament that can help with this? Inside the TeamResource form, I created two select fields—one shows on create, and the other on edit. Is there a simpler way to show the createOptionForm only when creating?
3 replies