© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
2 replies
ffcastaneda

Form inside Livewire Component:

In a livewire component I want to put a form, in this a select that must take the data from the Bank model.
How do I enable new records to be created in the Bank model?
public function form(Form $form): Form
{
return $form
->schema([
Select::make('bank_id')
->searchable()
->inlineLabel()
->translateLabel()
->preload()
->searchDebounce(500)
->loadingMessage('Loading banks...')
->getSearchResultsUsing(fn (string $search): array => Bank::where('bank', 'like', "%{$search}%")->limit(50)->pluck('bank', 'id')->toArray())
->getOptionLabelUsing(fn ($value): ?string => Bank::find($value)?->name),
])->columns(2)
->statePath('data');

}
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

use select form component inside livewire custom form
FilamentFFilament / ❓┊help
3y ago
action with form with livewire component inside
FilamentFFilament / ❓┊help
15mo ago
Access Livewire component data inside Resource form
FilamentFFilament / ❓┊help
15mo ago
Tabs inside Form Livewire
FilamentFFilament / ❓┊help
3y ago