PHPackages                             nowo-tech/form-kit-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. nowo-tech/form-kit-bundle

ActiveSymfony-bundle[Localization &amp; i18n](/categories/localization)

nowo-tech/form-kit-bundle
=========================

Symfony bundle to reduce repetitive form field options: convention-based labels/placeholder/help (form\_snake.field\_snake.\*), configurable attr/row\_attr/translation\_domain, and cascading option merge (global → field type → form → field). Symfony 7.4|8.

v2.0.5(yesterday)08[4 PRs](https://github.com/nowo-tech/FormKitBundle/pulls)MITPHPPHP &gt;=8.2 &lt;8.6CI passing

Since Mar 3Pushed 2w agoCompare

[ Source](https://github.com/nowo-tech/FormKitBundle)[ Packagist](https://packagist.org/packages/nowo-tech/form-kit-bundle)[ Docs](https://github.com/nowo-tech/FormKitBundle)[ GitHub Sponsors](https://github.com/HecFranco)[ RSS](/packages/nowo-tech-form-kit-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (43)Versions (13)Used By (0)

Form Kit Bundle
===============

[](#form-kit-bundle)

[![CI](https://github.com/nowo-tech/FormKitBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/nowo-tech/FormKitBundle/actions/workflows/ci.yml) [![Packagist Version](https://camo.githubusercontent.com/2001ad5e5346442d9ea8d689ef5f895b185448b1dd835483f0f4bc7e8166e118/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f776f2d746563682f666f726d2d6b69742d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/nowo-tech/form-kit-bundle) [![Packagist Downloads](https://camo.githubusercontent.com/17c501f8271591e46fa9c6e6684b267e32955ee6f40fa9eb54e0219fbadd219e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f776f2d746563682f666f726d2d6b69742d62756e646c652e737667)](https://packagist.org/packages/nowo-tech/form-kit-bundle) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE) [![PHP](https://camo.githubusercontent.com/3f99b197569aa2dcfbefff17ecc68d74098e7f929d8b52dc40f3a898f740eae1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f6c6f676f3d706870)](https://php.net) [![Symfony](https://camo.githubusercontent.com/7d2600c853ce86ff0be56b7d04cbd9e1f755df760e06d0fb72d70bb10f794702/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d372e34253230253743253230382e30253230253743253230382e312d3030303030303f6c6f676f3d73796d666f6e79)](https://symfony.com)

Symfony bundle to reduce repetitive form field options: convention-based translation keys (`form_snake.field_snake.label`, `.placeholder`, `.help`), configurable defaults and multiple configs via YAML, and cascading option merge (global → field type → form → field).

**Compatible with Symfony 7.4, 8.0 and 8.1** (PHP 8.2+; Symfony 8 requires PHP 8.4+).

Features
--------

[](#features)

- **Convention-based labels, placeholder and help:** Default translation keys are `{form_snake}.{field_snake}.label`, `.placeholder`, `.help`. Set any to `false` in field options to disable.
- **Multiple configs:** Define named configs (e.g. `default`, `bootstrap`) with `translation_domain`, `defaults.attr`, `defaults.row_attr`, and per-field-type options. Choose the active config per form via `setFormKitConfigName()`.
- **Cascading merge:** Options are merged in order: config defaults → field type → field options. Explicit field options override.
- **Trait or base class:** Use **FormOptionsTrait** with **FormOptionsMerger** (inject via service), or extend **FormKitAbstractType** for snake\_case type names with **FormTypeMap** (same option-merging model via FormOptionsMerger).
- **Phase 2 helpers:** `addText()`, `addEmail()`, `addTextarea()`, `addPassword()`, `addUrl()`, `addInteger()`, `addNumber()`, `addCheckbox()`, `addChoice()` — pass only field name and options.
- **Choice presets:** `addSelect()`, `addMultiSelect()`, `addChoiceRadios()`, `addChoiceCheckboxes()`, plus `addMultiSelectSelectAll()` when **nowo-tech/select-all-choice-bundle** is installed (optional Composer **suggest**).
- **FQCN helpers:** `addAutocompleteField()` for Symfony UX Autocomplete types, `addCKEditorField()` when **friendsofsymfony/ckeditor-bundle** is installed (CKEditor 4).
- **Model transformers:** `addSwitchType()`, `addJsonType()`, `addBoolType()`, `addMoneyType()`, `addCsvType()` (same helpers on **FormKitControllerTrait** with `*Type` suffix).
- **Build from array:** `buildFormFromArray($builder, $fields)` — define all fields in one array (type as FQCN with FormOptionsTrait, or snake\_case with FormKitTrait).
- **Optional types:** Built-in type map includes optional Symfony UX types (e.g. Dropzone, Cropper) and A2lix Translations when the corresponding package is installed. Extend via `type_map` in config.
- **Form type extensions:** **InputGroupExtension** (`input_group_prefix` / `input_group_suffix`), **RequiredLabelSuffixExtension** (suffix for required labels from config), **HelpModalExtension** (optional `help_modal` on fields + bundled `help-modal.js`, Bootstrap 4/5, Tailwind, Foundation; optional Twig shell templates). See [Configuration](docs/CONFIGURATION.md) and [Usage](docs/USAGE.md#help-modal-optional).

Installation
------------

[](#installation)

```
composer require nowo-tech/form-kit-bundle
```

With Flex, the recipe creates `config/packages/nowo_form_kit.yaml`. Otherwise register the bundle in `config/bundles.php` and add the config file manually. See [docs/INSTALLATION.md](docs/INSTALLATION.md).

Quick usage
-----------

[](#quick-usage)

1. **Configure** (optional) — edit `config/packages/nowo_form_kit.yaml`: set `default_config`, `configs` (each with `alias`, `translation_domain`, `defaults`, `field_types`), and optionally `type_map` for custom or UX types.
2. **Register your form as a service** and inject **FormOptionsMerger**:

```
# config/services.yaml
App\Form\UserProfileType:
  tags: ['form.type']
  calls:
    - setFormOptionsMerger: ['@Nowo\FormKitBundle\Form\FormOptionsMerger']
```

3. **Use the trait** in your form type (Phase 2 or array):

```
use Nowo\FormKitBundle\Form\FormOptionsTrait;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

class UserProfileType extends AbstractType
{
  use FormOptionsTrait;

  public function buildForm(FormBuilderInterface $builder, array $options): void
  {
    $this->addText($builder, 'full_name', []);
    $this->addEmail($builder, 'email_address', []);
    // Or: $this->buildFormFromArray($builder, ['full_name' => TextType::class, 'email_address' => EmailType::class]);
  }
}
```

4. **Add translations** for keys like `user_profile.full_name.label`, `user_profile.full_name.placeholder`, `user_profile.full_name.help` in your translation domain.

Demos
-----

[](#demos)

The bundle includes demos (Symfony 7 and 8) that run with **FrankenPHP** (Caddy + PHP in Docker). **`docker-compose`** defaults to **`APP_ENV=dev`**, so the entrypoint uses **Caddyfile.dev** (no PHP worker), and Twig/PHP changes are visible on refresh. **Worker mode** applies to a production-style setup — see [docs/DEMO-FRANKENPHP.md](docs/DEMO-FRANKENPHP.md). Each demo has:

- **Locale in the URL** — routes are under `/{locale}/…` (`en`, `es`, `fr`, `de`); `/` redirects to the default locale.
- **FormType** example (contact, `buildFormFromArray`), **help modal** sample (`help-modal.js` + `assets:install`; include `@NowoFormKit/help_modal/shells.html.twig` for overridable modal shells).
- Form built in the **controller** (`FormKitControllerTrait` / `FormOptionsMerger::resolve()`).
- **Search**, **example**, **Dropzone**, **Cropper**, **translations** (A2lix), **nested**, **data transformers**, **choice fields** (select / multiselect / radios / checkboxes; optional Select All Choice on Symfony 7/8 demos), **CKEditor** (FOSCKEditorBundle), **multi-step** wizard.

Run a demo via Docker/Make from the bundle root; see [demo/README.md](demo/README.md) and [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md).

For CSS frameworks, see [docs/USAGE.md](docs/USAGE.md) for ready-to-use configuration examples for **Bootstrap 5** and **Tailwind CSS**.

Documentation
-------------

[](#documentation)

Developer-facing docs and comments (Markdown, PHPDoc, JSDoc) are **English only**; see [Contributing — Language policy](docs/CONTRIBUTING.md#language-policy).

- [Demo with FrankenPHP (development and production)](docs/DEMO-FRANKENPHP.md)
- [Installation](docs/INSTALLATION.md)
- [Configuration](docs/CONFIGURATION.md)
- [Usage](docs/USAGE.md)
- [Help modal (field option + frontend script)](docs/USAGE.md#help-modal-optional)
- [Overriding bundle templates](docs/USAGE.md#overriding-bundle-templates)
- [Contributing](docs/CONTRIBUTING.md)
- [Changelog](docs/CHANGELOG.md)
- [Upgrading](docs/UPGRADING.md)
- [Release](docs/RELEASE.md)
- [Security](docs/SECURITY.md)
- [Engram](docs/ENGRAM.md)
- [Spec-driven development](docs/SPEC-DRIVEN-DEVELOPMENT.md)
- [Roadmap](docs/ROADMAP.md)

Tests and coverage
------------------

[](#tests-and-coverage)

- Tests: PHPUnit (PHP)
- PHP: 100%

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance98

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~5 days

Total

6

Last Release

1d ago

Major Versions

v1.0.0 → v2.0.02026-06-11

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v2.0.0PHP &gt;=8.2 &lt;8.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7947bfc3f2ce9574a18a2c60f3d95b5d1b0740e65dc929332c92f1df21f75ab?d=identicon)[HecFranco](/maintainers/HecFranco)

---

Top Contributors

[![HecFranco](https://avatars.githubusercontent.com/u/24323276?v=4)](https://github.com/HecFranco "HecFranco (13 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (3 commits)")

---

Tags

symfonybundleoptionstranslationformlabelplaceholderhelpconventionForm Type

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nowo-tech-form-kit-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nowo-tech-form-kit-bundle/health.svg)](https://phpackages.com/packages/nowo-tech-form-kit-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M204](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
