New answers tagged

3 votes

How to prepopulate the body field with the body of another node

If you add the template node ID as URL query parameter /node/add/product?template=123 this code adds the body content of the template: mymodule.module: use Drupal\node\Entity\Node; /** * Implements ...
  • 93.7k

Top 50 recent answers are included