F
Filament15mo ago
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();

}),
]),
])
`
2 Replies
MeniV
MeniVOP15mo ago
visual
No description
Joseteleuni2000
Joseteleuni200014mo ago
Hi , I have the same problem , which is the solution ??
Want results from more Discord servers?
Add your server