PHPackages                             corneltek/formkit - 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. corneltek/formkit

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

corneltek/formkit
=================

1.4.0(8y ago)242.9k4[4 issues](https://github.com/corneltek/FormKit/issues)2MITPHP

Since Mar 23Pushed 8y ago3 watchersCompare

[ Source](https://github.com/corneltek/FormKit)[ Packagist](https://packagist.org/packages/corneltek/formkit)[ RSS](/packages/corneltek-formkit/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (23)Used By (2)

FormKit
=======

[](#formkit)

[![Build Status](https://camo.githubusercontent.com/4a22430b4a0b225f12d5b659bae15bcac49a49d2ae471c2a0c74cbf29cb1039a/68747470733a2f2f7472617669732d63692e6f72672f636f726e656c74656b2f466f726d4b69742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/corneltek/FormKit)[![Latest Stable Version](https://camo.githubusercontent.com/e00e5f7a3e24c2dca41e4206de89e906cd9453dec6898f35548cfc7e4788a008/68747470733a2f2f706f7365722e707567782e6f72672f636f726e656c74656b2f666f726d6b69742f762f737461626c65)](https://packagist.org/packages/corneltek/formkit)[![Total Downloads](https://camo.githubusercontent.com/166b6404f930a6a6b9be5e6abd15f211a80ef8e1835b0c3afd149efe2ec921ef/68747470733a2f2f706f7365722e707567782e6f72672f636f726e656c74656b2f666f726d6b69742f646f776e6c6f616473)](https://packagist.org/packages/corneltek/formkit)[![Latest Unstable Version](https://camo.githubusercontent.com/fb9878645d6b4fc2586d4ebb9517961b4a850b705620d44dc086a55b0b874043/68747470733a2f2f706f7365722e707567782e6f72672f636f726e656c74656b2f666f726d6b69742f762f756e737461626c65)](https://packagist.org/packages/corneltek/formkit)[![License](https://camo.githubusercontent.com/745b135f985e7edd21afa9907ede5bac0c8a6de176aec32b9b8076c51136bb0b/68747470733a2f2f706f7365722e707567782e6f72672f636f726e656c74656b2f666f726d6b69742f6c6963656e7365)](https://packagist.org/packages/corneltek/formkit)[![Monthly Downloads](https://camo.githubusercontent.com/cb188eb01ce5e2e6c82df871126cd780882213a3be84299728e28c186453a70c/68747470733a2f2f706f7365722e707567782e6f72672f636f726e656c74656b2f666f726d6b69742f642f6d6f6e74686c79)](https://packagist.org/packages/corneltek/formkit)[![Daily Downloads](https://camo.githubusercontent.com/126ccd6d3f22c6d493a2f4bfbbbe960b235f673bbe68da502581f4da03a2e65d/68747470733a2f2f706f7365722e707567782e6f72672f636f726e656c74656b2f666f726d6b69742f642f6461696c79)](https://packagist.org/packages/corneltek/formkit)

With FormKit library, you can integrate form widgets with your own frameworks,

And of course, you can define your own form widgets for your applications easily.

Tired with HTML forms ? There are some widget layout engines that can render widget into HTML with HTML table or fieldsets/legends. Of course you can define your own layout engine too!

INSTALL
-------

[](#install)

```
composer require corneltek/formkit "^1.3"
```

USAGE
-----

[](#usage)

To use a text input widget:

```
$text = new FormKit\Widget\TextInput('username', array(
    'label' => 'Username',
    'placeholder' => 'Your name please',
    'hint'  => 'Please enter 6 characters for your username',
));
$text->value( 'default' )
    ->size(20);

echo $text; // render
```

Which outputs:

```

Please enter 6 characters for your username
```

SelectInput:

```
/* selector with group options */
$countries = new FormKit\Widget\SelectInput( 'country' , array(
    'label' => 'Country',
    'options' => array(
        'Test' => 'Test',
        'Asia' => array(
            'Taiwan',
            'Taipei',
            'Tainan',
            'Tokyo',
            'Korea',
        )
    )
));
```

Element API
-----------

[](#element-api)

```
use FormKit\Element;
$ul = new Element('ul');
$li = new Element('li');

$li->append( new Element('a') );
$li->appendText( "DOMText Node here" );

$li->addClass('item');
$li->setId('MyID');

$li->appendTo($ul);

echo $li->render();
```

Layout
------

[](#layout)

To use generic layout:

```
$layout = new FormKit\Layout\GenericLayout;
$layout->width(400);
$layout->addWidget( $text )
    ->addWidget( $password )
    ->addWidget( $remember )
    ->addWidget( $birthday )
    ->addWidget( $best_time )
    ->addWidget( $role )
    ->addWidget( $size )
    ->addWidget( $countries )
    ->cellpadding(6)
    ->cellspacing(6)
    ->border(0);
echo $layout;
```

Widget Factory
--------------

[](#widget-factory)

Form Widget Factory:

```
use FormKit\FormKit;
$username = FormKit::text('username');
$password = FormKit::password('password',array(
    'class' => 'your-element-class-name',
    'id' =>  'your-element-id',
    'value' => 'default password',
));

echo $username->render();
echo $password->render();
```

Open Tag &amp; Close Tag
------------------------

[](#open-tag--close-tag)

```
$form = new FormKit\Element\Form(array(
    'class' => 'blah blah'
));

// render elements manully
echo $form->open();
echo $form->renderChildren();
echo $form->close();

// which is equal to
echo $form->render();
```

Availabel Form Widgets
----------------------

[](#availabel-form-widgets)

- TextareaInput
- TextInput
- ButtonInput
- CheckboxInput
- ColorInput
- DateInput
- DatetimeInput
- FileInput
- HiddenInput
- Label
- PasswordInput
- RadioInput
- ResetInput
- SelectInput
- SubmitInput
- AjaxCompleteInput
- CanvasInput

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

[](#installation)

Install assets for demo:

```
$ assetkit install

```

License
-------

[](#license)

MIT License

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 96.1% 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 ~77 days

Recently: every ~113 days

Total

21

Last Release

3248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cc34cde233b660869ff329ed8e20df611f75dfb61aab3e30889ac153d3e5e61?d=identicon)[c9s](/maintainers/c9s)

---

Top Contributors

[![c9s](https://avatars.githubusercontent.com/u/50894?v=4)](https://github.com/c9s "c9s (418 commits)")[![CindyLinz](https://avatars.githubusercontent.com/u/285660?v=4)](https://github.com/CindyLinz "CindyLinz (15 commits)")[![EragonJ](https://avatars.githubusercontent.com/u/68322?v=4)](https://github.com/EragonJ "EragonJ (2 commits)")

### Embed Badge

![Health badge](/badges/corneltek-formkit/health.svg)

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

###  Alternatives

[pastuhov/yii2-yml-catalog

YML (Yandex Market Language) generator.

2116.7k](/packages/pastuhov-yii2-yml-catalog)[flagbit/table-attribute-bundle

The Flagbit Table Attribute Bundle for Akeneo PIM gives you the possibility to enrich your product with multi-dimensional data presentation in the form of tables, allowing you maximum flexibility within the PIM.

2310.4k](/packages/flagbit-table-attribute-bundle)[fastly/cdn

Fastly CDN module for Magento 1.x

275.5k](/packages/fastly-cdn)

PHPackages © 2026

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