Skip to main content
added 11 characters in body; edited tags; edited title
Source Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126

How can I return htmlHTML form in BlockBase Buildbuild function?

I include some form from API. And I want to include it in block, using Drupal\Core\Block\BlockBaseDrupal\Core\Block\BlockBase. My My function return htmlHTML tags, that has tag <form>.

But function build()build() return empty array. $element = array( '#markup' => $html ); return $element;

$element = array(
  '#markup' => $html
);
return $element;

How can I return html form in BlockBase Build?

I include some form from API. And I want to include it in block, using Drupal\Core\Block\BlockBase. My function return html tags, that has tag .

But function build() return empty array. $element = array( '#markup' => $html ); return $element;

How can I return HTML form in BlockBase build function?

I include some form from API. And I want to include it in block, using Drupal\Core\Block\BlockBase. My function return HTML tags, that has tag <form>.

But function build() return empty array.

$element = array(
  '#markup' => $html
);
return $element;
Source Link
Erbie
  • 19
  • 6

How can I return html form in BlockBase Build?

I include some form from API. And I want to include it in block, using Drupal\Core\Block\BlockBase. My function return html tags, that has tag .

But function build() return empty array. $element = array( '#markup' => $html ); return $element;