Issue with the select multiple state

Hey everyone, I’m running into an issue with the Select component in Filament. When I enable the multiple() option, the selected values return null in the save() method, even though I’ve selected options.
public function form(Form $form): Form
{
return $form
->schema([
Select::make('unique_identifier')
->label('Select the fields for the unique identifier')
->multiple()
->options($this->csvHeaders)
])
->statePath('data');
}

public function save()
{
$data = $this->form->getState();
dd($data);
}
public function form(Form $form): Form
{
return $form
->schema([
Select::make('unique_identifier')
->label('Select the fields for the unique identifier')
->multiple()
->options($this->csvHeaders)
])
->statePath('data');
}

public function save()
{
$data = $this->form->getState();
dd($data);
}
When i remove the multiple() from the select component, $data shows the selected value, but i want to be able to select multiple items and save them a certain way. Maybe it's something small, but i can't seem to get it to work. Thanks in advance 😄
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?