PHPackages                             jmversteeg/fieldwork - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. jmversteeg/fieldwork

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

jmversteeg/fieldwork
====================

Web forms for cool people

4.3.0(10y ago)1343MITPHPPHP &gt;=5.3

Since Feb 10Pushed 2mo ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (9)Used By (0)

fieldwork
=========

[](#fieldwork)

**Web forms for cool people**

[![Build Status](https://camo.githubusercontent.com/a8fa003a73e7b29740ad99644ab2af2aa23ae04d36604cb0b7d5c8062606f6d4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a6d76657273746565672f6669656c64776f726b2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/jmversteeg/fieldwork)[![Code Quality](https://camo.githubusercontent.com/b1e0d2be8832ad8c849776589c3e04bd84116dc99e04daf198d12d2bb0b30f05/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a6d76657273746565672f6669656c64776f726b2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jmversteeg/fieldwork/)[![Code Coverage](https://camo.githubusercontent.com/007fb0e6c03e07bbef74247f2f237b3b7cc1c893f03a401d242d8b86d5ce3020/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6a6d76657273746565672f6669656c64776f726b2e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/jmversteeg/fieldwork)

fieldwork will make your life easier by dealing with the trivial tasks of building web forms such as markup generation, validation and sanitization.

- Define entire forms using **PHP only**. All HTML and JavaScript code will be generated for you.
- Sanitizes and validates **client-side for convenience + performance** and **server-side for security**.

### Creating a simple form

[](#creating-a-simple-form)

```
use fieldwork\Form;
use fieldwork\components\TextField;
use fieldwork\components\Button;
use fieldwork\validators\EmailFieldValidator;

// Instantiate a new form
$contactForm = new Form('contactform');

// Add a text field with validation
$emailField = new TextField('email', 'Email address');
$emailField
   ->addValidator(new EmailFieldValidator())
   ->addTo($contactForm);

// Add a submit button
$submitButton = new Button('submit', 'Send', 'submit', Button::TYPE_SUBMIT);
$submitButton
   ->addTo($contactForm);

// Process the form
$contactForm->process();

if($contactForm->isSubmitted())
    echo 'Your email address is ' . $contactForm->v('email');
else
    echo $contactForm->getHTML();
```

#### TODO

[](#todo)

- Error message i18n
- Tighter AJAX integration / API
- Complete test coverage

#### HEAD

[](#head)

- Moved the front-end assets into a separate repo
- Added NumberSanitizer
- Added materialize.css compatible markup generation
- Fixed some bugs

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance56

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Recently: every ~73 days

Total

7

Last Release

3822d ago

PHP version history (2 changes)4.0.0PHP &gt;=5.3

2.0.x-devPHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/7693cb9ae34819dc62c2129f50553250fa79850f9d43dc2ffe858a416f11d3ac?d=identicon)[jmversteeg](/maintainers/jmversteeg)

---

Top Contributors

[![sgtlambda](https://avatars.githubusercontent.com/u/5894809?v=4)](https://github.com/sgtlambda "sgtlambda (309 commits)")

---

Tags

validationwordpressformgenerationForms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jmversteeg-fieldwork/health.svg)

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

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[arondeparon/laravel-request-sanitizer

An easy to use request sanitizer that allows you to sanitize your form data before validating it.

112151.6k1](/packages/arondeparon-laravel-request-sanitizer)[sheadawson/silverstripe-zenvalidator

Faster, easier client and server-side form validation for SilverStripe

5778.4k2](/packages/sheadawson-silverstripe-zenvalidator)[hybridlogic/validation

A simple, extensible validation library for PHP with support for filtering and validating any input array along with generating client side validation code.

641.1k](/packages/hybridlogic-validation)

PHPackages © 2026

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