Drupal 8 display webform programmatically

$view_builder = \Drupal::entityTypeManager()->getViewBuilder('webform');
$storage = \Drupal::entityTypeManager()->getStorage('webform');
$node = $storage->load('contact');
$build = $view_builder->view($node);
$output = render($build);

Leave a comment

Your email address will not be published. Required fields are marked *