Applying bulk actions to view items

This feature is available if you have a Basic subscription plan or higher.

Using the View Bulk Operations module, you can add an additional field to your views, allowing you and your users to select multiple items. You can then select a configurable action for these items, such as deleting them from your website.

Views bulk operation example

If a view uses the bulk operation field, each entry in the view has a check box in its displayed row.

To apply a bulk operation:

  1. Select one or more entries from the view. For example, you may have view that lists all of the unpublished blog entries on the website and includes a bulk operation field, with the Publish content and Delete items permissions.
  2. Select an operation to apply to the selected entries from the list of configured actions. For example, publishing the selected items.

    To apply an action to all of the entries returned by the view, select the check box in the header row of the view.

  3. Click Execute to publish them.

If you want your users to be able to select multiple items from a view and then apply an operation to those items, you must add the bulk operations field to the view.

Preparing your site

  1. To use Views Bulk Operations, ensure that the Views module is enabled at Modules > Views, and then click Save configuration.
  2. To create views that allow you to apply actions to more than one displayed result, enable the Views Bulk Operations module at Modules > Views Bulk Operations, and then click Save configuration.
  3. You must be familiar with views and how to create them. For more information about views, see Using views.

Adding the bulk operations field

To add the bulk operations field to your view:

  1. Go to Structure > Views.
  2. Views link

  3. Create a view or find the view that you want to modify and click edit.

    View edit page

  4. Select the view display that you want to modify, and expand its Edit details section.

    Expand Edit details section

  5. In the Fields section, click add.

    Fields add link

  6. Select the Content: Bulk operations field.

    Bulk operations field

  7. Click Add and configure fields.
  8. Expand the Views bulk operations section to select how the view displays the field.

    Views bulk operations section

  9. Expand the Selected operations sub-section to specify the available operations for the view.

    Selected operations sub-section

  10. After you've configured the field, click Apply (all displays).
  11. On the edit page for the view, click Save.

    Save changes on View page

Rearranging displayed fields

By default, the bulk operations field is created at the end of the list of fields associated with the view, and displays in the last column of the displayed view. To move the check box for bulk operations to another location in the view, such as the first column, you must rearrange the fields in the view.

To rearrange fields in a view:

  1. Go to Structure > Views.

    Views link

  2. Find the view that you want to modify and click edit.

    Edit link for view

  3. Select the view display for the appropriate view, and then expand its Edit details section.

    Expand Edit details section

  4. In the Fields section, select rearrange.

    Field rearrange link

  5. Drag the Bulk operations field to its new location in the list of fields.

    Rearranging fields

  6. Click Apply (all displays).
  7. Click Save.

    Save changes on View page

Configuring bulk operation actions

By default, the users with the administrator or site maintainer roles can apply any action to view items selected with the bulk operations field. To make actions available to other roles and their users, you must configure the permissions assigned to each action.

To view the list of available actions you can take on entries selected by the bulk operations field, and to configure their permissions, complete the following steps:

  1. Go to People > Permissions.

    People Permissions tab

  2. The Actions permissions section displays all of the available actions your users can select in views that use the bulk operations field. You cannot add actions to the list.
  3. For each action, select or clear the check boxes for each of the roles defined for your website.

    This allows or prevents users with these roles to perform these actions on selected view entries. Actions not selected for a role do not display in a view's list of actions for a user of that role.

  4. Click Save permissions.