© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•10mo ago•
2 replies
Lindiar Miftari

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
TeamResource
form, I created two
select
select
fields—one shows on
create
create
, and the other on
edit
edit
. Is there a simpler way to show the
createOptionForm
createOptionForm
only when creating?
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

Filament forms createOptionForm
FilamentFFilament / ❓┊help
3y ago
Conditional Rendering in filament forms
FilamentFFilament / ❓┊help
2y ago
Filament Multi Tenant app CreateOptionForm
FilamentFFilament / ❓┊help
2y ago
createOptionForm()
FilamentFFilament / ❓┊help
2y ago