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

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

anzeljg/wtforms
===============

WTForms for PHP

v1.3(4y ago)06LGPLv2PHPPHP &gt;=5.3.0

Since Aug 12Pushed 4y agoCompare

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

READMEChangelogDependencies (3)Versions (5)Used By (0)

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

[](#wtforms-php)

PHP WTForms library inspired by Python WTForms module

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

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

4

Last Release

1616d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c25793d1c57d1c6d3933e50402a58766f0d4caee9d5e4458c15fd046892a3d9?d=identicon)[anzeljg](/maintainers/anzeljg)

---

Top Contributors

[![anzeljg](https://avatars.githubusercontent.com/u/1914175?v=4)](https://github.com/anzeljg "anzeljg (8 commits)")[![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/anzeljg-wtforms/health.svg)

```
[![Health](https://phpackages.com/badges/anzeljg-wtforms/health.svg)](https://phpackages.com/packages/anzeljg-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)
