© 2026 Hedgehog Software, LLC

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

multi-select with relationship not returning data

Good afternoon.
I'm currently trying to make a Filament action on a livewire page which sends a message to selected users.
To select the users I'm using a multi-select. And I added a createOptionForm so a user can add additional users they want to message. This all works wonderful, except when I submit the form the data doesn't to exist (see picture).

I don't know if this is a bug in Filament or if I'm doing something wrong.

Said select
Forms\Components\Select::make('receivers')
  ->label('Ontvanger')
  ->required()
  ->relationship('receiver', 'email')
  ->searchable()
  ->preload()
  ->multiple()
  ->options(Auth::user()->contacts()->pluck('email', 'id'))
  ->createOptionForm([
      Hidden::make('owner_id')
        ->default(Auth::id()),
      Hidden::make('owner_type')
        ->default(User::class),
      TextInput::make('name')
         ->label('Naam')
         ->required(),
      TextInput::make('email')
         ->required()
         ->email(),
]),
Forms\Components\Select::make('receivers')
  ->label('Ontvanger')
  ->required()
  ->relationship('receiver', 'email')
  ->searchable()
  ->preload()
  ->multiple()
  ->options(Auth::user()->contacts()->pluck('email', 'id'))
  ->createOptionForm([
      Hidden::make('owner_id')
        ->default(Auth::id()),
      Hidden::make('owner_type')
        ->default(User::class),
      TextInput::make('name')
         ->label('Naam')
         ->required(),
      TextInput::make('email')
         ->required()
         ->email(),
]),


How I catch the data from the form

->action(function (array $data) {
    dd($data);
})
->action(function (array $data) {
    dd($data);
})
image.png
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

Multi select relationship complaining about json?
FilamentFFilament / ❓┊help
3y ago
Multi-Select Relationship by Image / Visually
FilamentFFilament / ❓┊help
3y ago
Select Multiple with relationship, data not showing in handleRecordCreation
FilamentFFilament / ❓┊help
3y ago
Issue with multi-select and $data array
FilamentFFilament / ❓┊help
3y ago