I'm using :
public function build() {
$form = $this->formBuilder->getForm('Drupal\mymodule\Form\Myformclass');
return $form;
}
to get form inside block. But Drupal community doesn't find it as an appropriate way to get form inside a block.
According to Drupal community module reviewing team, Do not hard-code class names in strings. I tried calling class directly but that is not serving my purpose, giving 505 error.
What's the right way to get a form inside a block?