PHPackages                             osoobe/wtforms - 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. osoobe/wtforms

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

osoobe/wtforms
==============

WTForms for PHP

v1.2(10y ago)0251[1 PRs](https://github.com/b4oshany/wtforms-php/pulls)LGPLv2PHPPHP &gt;=5.3.0

Since Aug 12Pushed 4y agoCompare

[ Source](https://github.com/b4oshany/wtforms-php)[ Packagist](https://packagist.org/packages/osoobe/wtforms)[ Docs](https://github.com/b4oshany/wtforms-php)[ RSS](/packages/osoobe-wtforms/feed)WikiDiscussions master Synced 1mo ago

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

wtforms-php
===========

[](#wtforms-php)

PHP Forms library inspired in python wtforms

Installing WTForms-PHP
----------------------

[](#installing-wtforms-php)

There are two ways to get WTForms-PHP, i.e. by composer install or download the package manually.

#### Get WTForms-PHP via composer

[](#get-wtforms-php-via-composer)

You can run the following terminal command in the root directory of your project:

```
composer install wtforms\wtforms
```

or add the the following lines to your composer.json file as a requirement:

```
wtforms\wtforms: 1.0
```

#### Get WTForms-PHP via download

[](#get-wtforms-php-via-download)

You can download the latest version of the project [here](https://github.com/b4oshany/wtforms-php/archive/v0.5.zip)

Using WTForms-PHP in your project
---------------------------------

[](#using-wtforms-php-in-your-project)

If your using composer with autoloading, you can simple use the `WTForms` namespace to load specific classes or modules from the WTForms-PHP library. For instance:

```
use WTForms\Form;
use WTForms\Fields\StringField;
```

Otherwise, you have to manually include them by doing the following:

```
require_once 'path/to/wtforms-php/src/Form.php';
require_once 'path/to/wtforms-php/src/fields/StringField.php';
```

Create a WTForm Object
----------------------

[](#create-a-wtform-object)

The example below is used to create form object with a list of form input fields.

```
class AddressForm extends Form{
    function setUp(){
        $this->_fields = [
            "street" => (new Fields\StringField("Street")),
            "town" => (new Fields\StringField("Town/District"))->required(),
            "parish" => (new Fields\StringField("Parish"))->required(),
            "country" => (new Fields\StringField("Country"))->required(),
        ]
    }
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~70 days

Total

3

Last Release

3793d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1830494?v=4)[Oshane Bailey](/maintainers/b4oshany)[@b4oshany](https://github.com/b4oshany)

---

Top Contributors

[![b4oshany](https://avatars.githubusercontent.com/u/1830494?v=4)](https://github.com/b4oshany "b4oshany (5 commits)")[![trilopin](https://avatars.githubusercontent.com/u/4096774?v=4)](https://github.com/trilopin "trilopin (5 commits)")

---

Tags

phpFormswtforms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/osoobe-wtforms/health.svg)

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

###  Alternatives

[netojose/laravel-bootstrap-4-forms

Bootstrap 4 form builder for Laravel 5

182115.3k](/packages/netojose-laravel-bootstrap-4-forms)[contributte/forms-multiplier

Multiplier for nette forms

281.4M3](/packages/contributte-forms-multiplier)[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)[stevenmaguire/zurb-foundation-laravel

Build HTML form elements for Foundation inside Laravel

193.8k](/packages/stevenmaguire-zurb-foundation-laravel)[tonegabes/filament-better-options

Filament form components for better radio and checkbox options.

155.2k](/packages/tonegabes-filament-better-options)

PHPackages © 2026

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