Example of a simple form render array being constructed by a Form Factory instance.

This project is not covered by Drupal’s security advisory policy.

This module serves as the superstructure for formfactorykits module.

It provides a simple service which can load an existing $form array, append FormFactoryKit objects & return a modified $form array.

public function buildForm(array $form, FormStateInterface $form_state) {
  $factory = $this->formFactoryService->load($form);
  $k = $this->formFactoryKitsService;

  $factory->append($k->text())
    ->append($k->submit());

  return $factory->getForm();
}
Supporting organizations: 

Project information

Releases