PHPackages                             klapuch/form - 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. klapuch/form

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

klapuch/form
============

Highly customizable forms in multiple formats

5.4.0(8y ago)01.4kPHPPHP &gt;=7.1

Since Nov 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/klapuch/Form)[ Packagist](https://packagist.org/packages/klapuch/form)[ Docs](https://www.github.com/klapuch/Form)[ RSS](/packages/klapuch-form/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (21)Used By (0)

Form
====

[](#form)

[![Build Status](https://camo.githubusercontent.com/be50f9ff06cb2efb01b49d7e8a0bb02747d8a3e469f88c4e46f3c63af4eb6b56/68747470733a2f2f7472617669732d63692e6f72672f6b6c61707563682f466f726d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/klapuch/Form) [![Build status](https://camo.githubusercontent.com/5a64d337c3e1cfe32b1c15e269961fe6d205706dc22a446636822b73795b6dfb/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f337169777776307662693565373174343f7376673d74727565)](https://ci.appveyor.com/project/facedown/form) [![Coverage Status](https://camo.githubusercontent.com/118372850d4c860424d8b1728e41db85895034a785713041396438da672ce053/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6b6c61707563682f466f726d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/klapuch/Form?branch=master)

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

[](#documentation)

### Installation

[](#installation)

`composer require klapuch/form`

### Usage

[](#usage)

#### Form

[](#form-1)

```
new Form\RawForm(
	[
		'method' => 'POST',
		'role' => 'form',
		'class' => 'form-horizontal',
		'action' => '/process.php',
		'name' => self::NAME,
	],
	new Form\CsrfInput($this->csrf)
);
```

#### Select with options

[](#select-with-options)

```
new Form\Select(
	new Form\FakeAttributes(['name' => 'fruit']),
	new Form\Option(
		new Form\DependentAttributes(['value' => 'apple'], $this->storage, 'fruit'),
		'Apple',
		new Validation\OneOfRule(['apple', 'berry'])
	),
	new Form\Option(
	new Form\DependentAttributes(['value' => 'berry'], $this->storage, 'fruit'),
	'Berry',
	new Validation\OneOfRule(['apple', 'berry'])
	)
);
```

#### Input with label

[](#input-with-label)

```
new Form\BoundControl(
	new Form\Input(
		new Form\StoredAttributes(
			[
				'type' => 'email',
				'name' => 'email',
				'class' => 'form-control',
				'required' => 'required',
			],
			$this->storage
		),
		new Constraint\EmailRule()
	),
	new Form\LinkedLabel('Email', 'email')
);
```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~9 days

Total

20

Last Release

3270d ago

Major Versions

1.0.0 → 2.0.02016-12-10

2.2.2 → 3.0.02016-12-12

3.0.0 → 4.0.02017-02-26

4.0.0 → 5.0.02017-03-11

### Community

Maintainers

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

---

Top Contributors

[![klapuch](https://avatars.githubusercontent.com/u/17772194?v=4)](https://github.com/klapuch "klapuch (88 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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