Hello, I am trying to set up a factory for my form element, but it does not work. The element is specified in the form annotations. The configuration of the factory for the element should be spelled out in the config, but does not pick up anything. The temporary stub as Exception does not work. I'm trying to do this so that I can later implement my render for the selected item.

### Entity namespace Application; ... use Zend\Form\Annotation; ... class SomeEntity { ... /** * @Annotation\Type("Application\Form\Element\CustomElement") */ public $custom; ... } ### module.config.php ... 'form_elements' => [ 'factories' => [ \Application\Form\Element\CustomElement::class => function () { throw new \Exception('It works? No!'); }, ], ], ... ### IndexController function indexAction() { ... $class = $this->params()->fromQuery('entity'); $b = new AnnotationBuilder($this->getObjectManager()); $form = $b->createForm($class); ... } ### CustomElement namespace Application\Form\Element; use Zend\Form\Element; class CustomElement extends Element { } 

0