CheckboxList not passing data

Hello, i have search the docs but i cant seem to be able to selected items from the CheckBoxList. I have it nested in a wizard. All other fields data are coming through but i cant get data from the CheckboxList
Actions\Action::make('sendSms')
->label('Send message')
->steps([
Step::make('Contacts')
->description('Select the message recipients')
->schema([
CheckboxList::make('contactId')
->relationship('contacts', 'name')
->label('Contacts')
->bulkToggleable()
->searchable()
->columns(3)
->required(),
]),
Step::make('Message')
->description('Lets craft that message')
->schema([
Textarea::make('message')
->label('Message')
->minLength(2)
->autofocus()
->autosize()
->required(),
]),
])
->action(function (array $data): void {
dd($data['contactId']); // This is empty

foreach ($data['contactId'] as $id) {
//
}
})
Actions\Action::make('sendSms')
->label('Send message')
->steps([
Step::make('Contacts')
->description('Select the message recipients')
->schema([
CheckboxList::make('contactId')
->relationship('contacts', 'name')
->label('Contacts')
->bulkToggleable()
->searchable()
->columns(3)
->required(),
]),
Step::make('Message')
->description('Lets craft that message')
->schema([
Textarea::make('message')
->label('Message')
->minLength(2)
->autofocus()
->autosize()
->required(),
]),
])
->action(function (array $data): void {
dd($data['contactId']); // This is empty

foreach ($data['contactId'] as $id) {
//
}
})
0 Replies
No replies yetBe the first to reply to this messageJoin