PHPackages                             bancer/form-builder - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bancer/form-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bancer/form-builder
===================

HTML forms builder for CakePHP

0.9.1(4y ago)06MITPHPPHP &gt;=5.6

Since Oct 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bancer/form-builder)[ Packagist](https://packagist.org/packages/bancer/form-builder)[ RSS](/packages/bancer-form-builder/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

form-builder (for CakePHP)
==========================

[](#form-builder-for-cakephp)

This package is a wrapper for CakePHP FormHelper. Compatible with CakePHP 3.x and 4.x.

How to install
--------------

[](#how-to-install)

Execute `composer require bancer/form-builder` or `composer require bancer/form-builder --update-no-dev` to install by composer.

Why and when to use
-------------------

[](#why-and-when-to-use)

Use this package if you would like to get a different interface for constructing HTML forms than provided by CakePHP's FormHelper class. This package wraps FormHelper class and provides builder methods instead of FormHelper method options. It does not change the behavior of FormHelper. In addition it provides methods for some common HTML element attributes. It is expected to make the construction of forms easier and less error prone due to fewer number of magic strings necessary to build form elements. An extra benefit is code autocompletion in any IDE or editor that supports autocompletion of PHP code.

How to use
----------

[](#how-to-use)

Example in the view file:

```
use Bancer\FormBuilder\FormBuilder;
...
$FormBuilder = new FormBuilder($this->Form); // where $this->Form is an instance of FormHelper
$FormBuilder->newForm($user)
    ->method('post')
    ->url(['controller' => 'users', 'action' => 'edit'])
    ->encoding('UTF-8')
    ->id('edit-user')
    ->classes('narrow-form');
echo $FormBuilder->newControl('User.email')
    ->label(__('Email'))
    ->readOnly()
    ->size(50)
    ->attribute('data-validated', 1)
    ->attribute('oninvalid', 'alert('Invalid email')');
echo $FormBuilder->newControl('User.password')
    ->label(__('Password'))
    ->type('password')
    ->size(30)
    ->minLength(8)
    ->maxLength(30)
    ->required(false);
echo $FormBuilder->newSubmit(__('Submit'));
echo $FormBuilder->end();
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

1671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ebb49f7218c6a5e34f840d066b8820cc054b6b7f43a7b2edbde9464f3df8289?d=identicon)[bancer](/maintainers/bancer)

---

Top Contributors

[![bancer](https://avatars.githubusercontent.com/u/3830106?v=4)](https://github.com/bancer "bancer (37 commits)")

---

Tags

cakephpfluent-interfaceform-builderformsphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bancer-form-builder/health.svg)

```
[![Health](https://phpackages.com/badges/bancer-form-builder/health.svg)](https://phpackages.com/packages/bancer-form-builder)
```

###  Alternatives

[tkaratug/tcmb_currency_converter

TCMB Currenct Converter

221.0k](/packages/tkaratug-tcmb-currency-converter)

PHPackages © 2026

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