Is it possible to pre-select some entities

Created on 29 August 2024, 3 months ago
Updated 13 September 2024, 3 months ago

Problem/Motivation

Hi!

I'm trying to build custom VBO form plugin which extends ViewsBulkOperationsBulkForm and in custom form I need to pre-select some entities when the form loads first time on a page.

And it should work with pager with there are multiple pages of the results.

And the Selected items should show correct value in summary.

Then if user de-selects already selected or selects new items it should be updated according to the selection not to initial default items and then processed on submit.

I'm trying to manipulate with the tempStoreData before execute parent::viewsForm() in custom plugin class. But can't find working solution.

At this moment I can get only views results from current page, and setting $this->tempStoreData['list'][$bulk_form_key] = $this->getListItem($bulk_form_key); and then $this->setTempstoreData($this->tempStoreData); doesn't work.

Any suggestions?

Thanks!

πŸ’¬ Support request
Status

Fixed

Version

4.2

Component

Core

Created by

πŸ‡ΊπŸ‡¦Ukraine khiminrm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024