Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

formfactorykits

2 sites No security coverage
View on drupal.org

Make custom Drupal forms... faster.

This module provides a service capable of creating FormFactoryKit objects.

Each kit is able to generate an array compatible with Drupal's Render API.

When appended to a FormFactory instance (provided by formfactory module), the kit is used to help create a complete form.

The kits provided by this module are merely covering Form API basics. Collections of Kit objects can be provided by any module.

Example

  public function buildFormObject(FormFactoryInterface $form_factory, FormFactoryKitsInterface $kits): void
  {
    // Optional: the Form State object can be accessed via the Form Factory.
    $form_state = $form_factory->getFormState();

    // Create VerticalTabsKit & add it to the FormFactory instance.
    $tabs = $kits->verticalTabs();
    $form_factory->append($tabs);

    // Create a "dogs" TabKit & add it to the VerticalTabsKit instance.
    $dogsTab = $tabs->createTab('dogs')
      ->setTitle($this->t('Dogs'));
    $dogsTab->append(
      $kits->image('dogs_image')
        ->setTitle($this->t('Image'))
    );
    $dogsTab->append(
      $kits->textarea('dogs_description')
        ->setTitle($this->t('Description'))
    );
    $dogsTab->append(
      $kits->checkboxes('dogs_attributes')
        ->setTitle($this->t('Attributes'))
        ->appendOption(['a' => $this->t('A')])
        ->appendOption(['b' => $this->t('B')])
        ->appendOption(['c' => $this->t('C')])
        ->setDefaultValue(['b'])
    );

    // Create a "cats" TabKit & add it to the VerticalTabsKit instance.
    $tabs->createTab('cats')
      ->setTitle($this->t('Cats'))
      ->append($kits->image('cats_image')->setTitle($this->t('Image')))
      ->append($kits->textarea('cats_description')->setTitle($this->t('Description')));

    // Create a SubmitKit & add it to the FormFactory instance.
    $form_factory->append($kits->submit());
  }

Documentation

Activity

Total releases
3
First release
Nov 2025
Latest release
4 months ago
Release cadence
11 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
2.1.0-beta1 Pre-release Dec 13, 2025
2.0.0-beta5 Pre-release Nov 22, 2025
2.0.0-beta4 Pre-release Nov 22, 2025