© 2026 Hedgehog Software, LLC

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

Value in Select component

I see the value in the Select component, but when selected, I only get the array position of the Select component in the database.
I want the code as seen in the Documentation where the Select component gives the value:
`'draft' => 'Draft'
`'draft' => 'Draft'
``.
How can I best modify this code? Excuse for my poor English...

`->headerActions([
                Tables\Actions\CreateAction::make(),
                Tables\Actions\AttachAction::make()
                    ->form(fn(AttachAction $action): array => [
                        $action->getRecordSelect(),
                        Forms\Components\Select::make('details')->multiple()
                            ->options(function (RelationManager $livewire): array {
                                return $this->getOwnerRecord()
                                    ->getAttribute('eventtype')
                                    ->toArray();

                            }),
                    ]),
            ])
`->headerActions([
                Tables\Actions\CreateAction::make(),
                Tables\Actions\AttachAction::make()
                    ->form(fn(AttachAction $action): array => [
                        $action->getRecordSelect(),
                        Forms\Components\Select::make('details')->multiple()
                            ->options(function (RelationManager $livewire): array {
                                return $this->getOwnerRecord()
                                    ->getAttribute('eventtype')
                                    ->toArray();

                            }),
                    ]),
            ])
`
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

Preselect Value in Core Select Component
FilamentFFilament / ❓┊help
8mo ago
Default value with searchable in select component
FilamentFFilament / ❓┊help
3y ago
Settings Select form component default value in relation
FilamentFFilament / ❓┊help
2mo ago
enum value in Forms\Components\Select
FilamentFFilament / ❓┊help
2y ago