© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Frank

Reuse a Form Resource in createOptionForm

Hi, sorry if this is a bit obvious.

When creating a select from relationship and allowing the option to create an option. How can i reuse an exsiting form resource ?

 Forms\Components\Select::make('artwork_id')
                            ->relationship(
                                name: 'artwork',
                                titleAttribute: 'name',
                                modifyQueryUsing: fn (Builder $query) => $query->where('organisation_id', $organisationId),
                            )
                            ->searchable(['name', 'original_name'])
                            ->createOptionForm(
                                // ArtworkResource::form()
                            ),
 Forms\Components\Select::make('artwork_id')
                            ->relationship(
                                name: 'artwork',
                                titleAttribute: 'name',
                                modifyQueryUsing: fn (Builder $query) => $query->where('organisation_id', $organisationId),
                            )
                            ->searchable(['name', 'original_name'])
                            ->createOptionForm(
                                // ArtworkResource::form()
                            ),
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

reuse existing resource in select (createOptionForm)
FilamentFFilament / ❓┊help
3y ago
Reuse resource form in another livewire component
FilamentFFilament / ❓┊help
3y ago
Reuse Infolist in other resource
FilamentFFilament / ❓┊help
2y ago
Form schema reuse
FilamentFFilament / ❓┊help
6mo ago