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

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

jnjxp/form
==========

Describe collections of HTML form inputs

0.3.0(8y ago)1265[1 issues](https://github.com/jnjxp/jnjxp.form/issues)MITPHP

Since Jun 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jnjxp/jnjxp.form)[ Packagist](https://packagist.org/packages/jnjxp/form)[ Docs](https://github.com/jnjxp/jnjxp.form)[ RSS](/packages/jnjxp-form/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependenciesVersions (5)Used By (0)

jnjxp.form
==========

[](#jnjxpform)

Describe collections of HTML form inputs

[![Latest version](https://camo.githubusercontent.com/07447d18c81590162a577865f2c27fb5636cff2d242af08d9a37ff5684647279/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6e6a78702f666f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jnjxp/form)[![Build Status](https://camo.githubusercontent.com/f8c826bf20bc799547c5c0de52d06fa47783680f2827d5f7b287a22d13154461/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a6e6a78702f6a6e6a78702e666f726d2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/jnjxp/jnjxp.form)[![Coverage Status](https://camo.githubusercontent.com/b75f052fd595fa8bc26a74912a29da62907483203d49301c5651406cbe3c7b1e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6a6e6a78702f6a6e6a78702e666f726d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jnjxp/jnjxp.form)[![Quality Score](https://camo.githubusercontent.com/3b53ce7a7dc70a5870660e1e8df6034afeaf6cfea8e66544ad99c670ed3f5271/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a6e6a78702f6a6e6a78702e666f726d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jnjxp/jnjxp.form)

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

[](#installation)

```
composer require jnjxp/form

```

Usage
-----

[](#usage)

```
$form = (new Jnjxp\Form\FieldFactory)->newFieldCollection();

$form->add('username')
    ->type('text')
    ->label('Username')
    ->attribs(['required' => true])
    ->help('Enter username or email address');

$form->add('password')
    ->type('password')
    ->label('Password')
    ->attribs(['required' => true]);

$data = $filter->apply($input);
$form->fill($data);
$form->errors($filter->getFailures()->getMessages());

foreach ($form as $field) {

    $group = ['form-group'];
    $label = ['class' => 'control-label'];

    if ($field->id) {
        $group[] = 'form-group_' . $field->id;
        $label['for'] = $field->id;
    }

    if ($field->errors) {
        $group[] = 'has-errors';
    }

    echo $helper->tag('div', ['class' => $group]);

    if ($field->label) {
        echo PHP_EOL;
        echo $helper->label($field->label, $label);
    }

    echo PHP_EOL;
    echo $helper->input($field->spec);

    if ($field->help) {
        echo PHP_EOL;
        echo $helper->tag('p', ['class' => 'help-block']);
        echo $field->help;
        echo $helper->tag('/p');
    }

    if ($field->errors) {
        $errors = $helper->ul(['class' => 'errors']);
        $errors->items($field->errors);
        echo PHP_EOL;
        echo $errors;
        echo PHP_EOL;
    }

    echo $helper->tag('/div') . PHP_EOL;
    echo PHP_EOL;
}
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

3

Last Release

3211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64baf5fff415327ccc832998afe54b34ac3c621e401f128a9343d4e0b0a3f9e4?d=identicon)[jnj](/maintainers/jnj)

---

Top Contributors

[![jakejohns](https://avatars.githubusercontent.com/u/174708?v=4)](https://github.com/jakejohns "jakejohns (17 commits)")

### Embed Badge

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

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

###  Alternatives

[tractorcow/silverstripe-sliderfield

Simple slider field for Silverstripe

1425.5k](/packages/tractorcow-silverstripe-sliderfield)

PHPackages © 2026

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