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')


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