Drupal 8 - Mass edit field value

By xngo on June 26, 2019

Drupal 8 doesn't provide by default a feature to mass edit node field value. However, there is a module for this. It is called Views Bulk Operations (VBO). With this module, it allows you to apply different operations on each node that you selected from the views.

The default operations provided by VBO are:

  • Delete comment
  • Demote selected content from front page
  • Publish selected content
  • Unpublish content containing keyword(s)
  • Unpublish selected content
  • Save content
  • Make selected content sticky
  • Make selected content not sticky
  • Change the author of content
  • Promote selected content to front page

Unfortunately, the default operations don't include Modify field values. You have to install another module called Views Bulk Edit to get that operation.

Installation

Install and enable the following modules:

Setup Views

In your view, add the global field called Views bulk operations.

Then, select Modify field values action.

Apply the action on nodes

On your view page, check on the line of node that you want the operation to be applied. Then, select Modify field values action and then click on apply.

Now, select the field that you want to change. For my case, I want to change all the selected nodes to have Tags equal to Python.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.