I read the documentation, but I failed to configure it. The issue comes in 2 things:
1- how to pass the selected asset_status_id to the controller ? for this, I wrote:
if ($this->request->is([‘patch’, ‘post’, ‘put’])) {
$asset_status_id = $this->request->data(‘asset_status_id’);
}
and in the view:
<?= $this->Form->input('asset_status_id', ['options' => $assetStatuses, 'empty' => true, 'label' => __('Change Status To')]) ?>
2- how to pass the id of the selected rows (selected with checbox) ?
I used:
if ($this->request->is([‘patch’, ‘post’, ‘put’])) {
$ids = $this->request->data(‘AssetsAssignations.id’);
}
in the view:
< input name=“data[AssetsAssignations][id]” value=“<?= $assetsAssignation->id ?>” id=“AssetsAssignationsId1” type=“checkbox”>