© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
Vp

How to auto fill multiple select in Action

I have added new button and it contains multiple select, How can I make the select field auto display the name in EDIT

Tables\Actions\Action::make('link-account')
->mountUsing(
function (Forms\ComponentContainer $form, Customer $record) {
$childCustomer = Customer::where('approver', $record->id)->pluck('id');

$form->fill([
'approver_id' => $record->id,
'name' => $record->name.' ('.$record->idd.' '.$record->phone_number.')',
'child' => $childCustomer,
]);
}
)
->form([
Forms\Components\Hidden::make('approver_id'),
Forms\Components\TextInput::make('name')
->label(('Approver'))
->disabled(),

Forms\Components\Select::make('child')
->label(
('Child'))
->multiple()
->options(Customer::query()->active()->pluck('name', 'id'))
->searchable()
->required(),
])
->action(function (array $data): void {
dd($data);
}),

If it's empty then it working fine, but for edit the problem come like it diplay the ID in multi select field, not name... and in
dd($data)
dd($data)
action it comes the name, not ID

Sorry for bad english
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

Select multiple - fill
FilamentFFilament / ❓┊help
8mo ago
auto fill when i select
FilamentFFilament / ❓┊help
16mo ago
how to fill uuid import action bulk
FilamentFFilament / ❓┊help
2y ago
Select::createOptionForm fill?
FilamentFFilament / ❓┊help
16mo ago