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.2.0(2w ago)01.1k10MITPHPPHP &gt;=8.2 &lt;8.6CI passing

Since Mar 3Pushed 1mo 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 1w ago

READMEChangelog (10)Dependencies (79)Versions (35)Used By (10)

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) [![GitHub stars](https://camo.githubusercontent.com/cedc41bd43c71e4e7fa47a6b23ae5ae970860ad02a8f96e544cdf353261dc7fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6e6f776f2d746563682f466f726d4b697442756e646c652e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/nowo-tech/FormKitBundle) [![Coverage](https://camo.githubusercontent.com/7e3637fab8f74d40329e548fac4d756b485fe3deaf450c4664cb2ccc1413a534/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f7665726167652d39392e362532352d627269676874677265656e)](#tests-and-coverage)

> ⭐ **Found this useful?** Install from [Packagist](https://packagist.org/packages/nowo-tech/form-kit-bundle) and give the repo a star on GitHub.

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).

**Minimum requirements: PHP 8.2 and Symfony 7.4.** Also compatible with Symfony 8.0 and 8.1 (require 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), **Nowo special fields** (OTP, phone, password, icon selector, Tiptap, CKEditor 5 — see [demo/README.md](demo/README.md)), **CKEditor** (FOSCKEditorBundle), **UX Autocomplete**, **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).

- [Installation](docs/INSTALLATION.md)
- [Configuration](docs/CONFIGURATION.md)
- [Usage](docs/USAGE.md)
- [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)
- [GitHub Spec Kit](docs/SPEC-KIT.md)
- [Roadmap](docs/ROADMAP.md)

### Additional documentation

[](#additional-documentation)

- [Demo with FrankenPHP (development and production)](docs/DEMO-FRANKENPHP.md)
- [Help modal (field option + frontend script)](docs/USAGE.md#help-modal-optional)
- [Overriding bundle templates](docs/USAGE.md#overriding-bundle-templates)

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

[](#tests-and-coverage)

- Tests: PHPUnit (PHP), Vitest (TypeScript)
- PHP: 99.59%
- TS/JS: 100%
- Python: N/A

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance94

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 65.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 ~6 days

Total

24

Last Release

14d 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 (32 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (6 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.3k18.3M430](/packages/easycorp-easyadmin-bundle)[sylius/sylius

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

8.5k6.0M778](/packages/sylius-sylius)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M674](/packages/shopware-core)

PHPackages © 2026

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