I need a page to be half content, half node edit form.
How can I do this? I thought I'd put the content type's form display into a block. Sounds easy enough.
I've been trying contrib and custom modules, but I can't seem to grab the form.
Thought I could get away with something like this.
class EvaluationBlock extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
$render_array = EntityFormDisplay::collectRenderDisplay($node, 'project_evaluation_form');
// error_log($render_array);
return $render_array;
}
}
}