Bulk actions
Tick rows (or all matches of the filter) and run an action on them: with options, with a dialog asking for values, or with a confirmation.
- Tick the whole page to get "Select all N matches".
- "Assign manager …" opens a dialog with two fields.
Try it: log in with the demo account
Email demo@frontdesk-demo.test · Password Try-Frontdesk-2026
Everyone shares this account. You may change anything – all data is reset every night.
The code
app/src/Controllers/ProjectController.php – defineBulkActions()
whole file
protected function defineBulkActions(): array
{
return [
BulkAction::create('status', 'Set status to', function (DataList $projects, ?string $status) {
foreach ($projects as $project) {
$project->Status = $status;
$project->write();
}
return $projects->count() . ' projects changed.';
})->options(Project::STATUSES),
BulkAction::create('assign', 'Assign manager …', function (DataList $projects, array $data) {
foreach ($projects as $project) {
$project->ManagerID = (int) $data['ManagerID'];
$project->Priority = (string) $data['Priority'];
$project->write();
}
return $projects->count() . ' projects assigned.';
})
->fields(fn () => FieldList::create(
DropdownField::create('ManagerID', 'Manager', $this->managerOptions())->setHasEmptyDefault(true),
DropdownField::create('Priority', 'Priority', Project::PRIORITIES)->setValue('normal')
), ['ManagerID'])
->submitLabel('Assign'),
BulkAction::create('delete', 'Delete', function (DataList $projects) {
$count = $projects->count();
foreach ($projects as $project) {
$project->delete();
}
return $count . ' projects deleted.';
})->confirm('Delete {count} projects?'),
];
}