PHPackages                             freelancehunt/html\_quickform2 - 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. freelancehunt/html\_quickform2

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

freelancehunt/html\_quickform2
==============================

Provides methods to create, validate and render HTML forms in PHP.

v2.3.2(1y ago)02.3kBSD-3-ClausePHPPHP &gt;=5.6.0

Since Feb 17Pushed 1y agoCompare

[ Source](https://github.com/freelancehunt/HTML_QuickForm2)[ Packagist](https://packagist.org/packages/freelancehunt/html_quickform2)[ Docs](https://pear.php.net/package/HTML_QuickForm2/)[ RSS](/packages/freelancehunt-html-quickform2/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (17)Used By (0)

HTML\_QuickForm2
================

[](#html_quickform2)

[![Build Status](https://camo.githubusercontent.com/474ed2e20d3c0dc12e3934ca9c84d4671eb4100c169d0ec26efb4c0d5a8a1c8e/68747470733a2f2f7472617669732d63692e636f6d2f667265656c616e636568756e742f48544d4c5f517569636b466f726d322f776f726b666c6f77732f436f6e74696e756f7573253230496e746567726174696f6e2f62616467652e7376673f6272616e63683d7472756e6b)](https://travis-ci.com/freelancehunt/HTML_QuickForm2/actions?query=branch%3Atrunk+workflow%3A%22Continuous+Integration%22)

This is fork of \[pear/HTML\_QuickForm2\] with additional changes for our needs, so it doesn't work for everyone.

HTML\_QuickForm2 provides methods to create, validate and render HTML forms. It is a PHP5 rewrite of [PEAR HTML\_QuickForm](https://pear.php.net/package/HTML_QuickForm/)and related packages.

Features:

- Supports all form elements defined in HTML4, provides several custom elements. Support for HTML5 form elements is planned.
- Server-side and client-side validation, several common rules provided. Validation rules can be combined with 'and' and 'or' for complex validation scenarios. Client-side validation can be run on changing the form field and on submitting the form.
- Client-side validation and Javascript-backed elements use a small self-contained JS library, there is no dependency on JS frameworks.
- Multipage forms (tabbed forms and wizards) are possible.
- Pluggable elements, rules, renderers and renderer plugins.

Please report issues via the [PEAR bug tracker](https://pear.php.net/bugs/search.php?cmd=display&package_name%5B%5D=HTML_QuickForm2) or [Github issues](https://github.com/pear/HTML_QuickForm2/issues).

Pull requests are welcome.

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

[](#installation)

The package may be installed either with PEAR

```
$ pear install HTML_QuickForm2

```

or with composer

```
$ composer require pear/html_quickform2

```

Since release 2.1 composer installation relies completely on autoloading and does not contain `require_once` calls or use `include-path` option.

Basic usage
-----------

[](#basic-usage)

```
require_once 'HTML/QuickForm2.php'; // Only when installed with PEAR

$form = new HTML_QuickForm2('tutorial');

// Set defaults for the form elements
$form->addDataSource(new HTML_QuickForm2_DataSource_Array([
    'name' => 'Joe User'
]));

// Add some elements to the form
$fieldset = $form->addElement('fieldset')->setLabel('QuickForm2 tutorial example');
$name = $fieldset->addElement('text', 'name', ['size' => 50, 'maxlength' => 255])
                 ->setLabel('Enter your name:');
$fieldset->addElement('submit', null, ['value' => 'Send!']);

// Define filters and validation rules
$name->addFilter('trim');
$name->addRule('required', 'Please enter your name');

// Try to validate a form
if ($form->validate()) {
    echo 'Hello, ' . htmlspecialchars($name->getValue()) . '!';
    exit;
}

// Output the form
echo $form;
```

Additional examples are in the docs/examples directory.

Documentation
-------------

[](#documentation)

...is available on PEAR website

- [Tutorial](http://pear.php.net/manual/en/package.html.html-quickform2.tutorial.php)
- [Migration from HTML\_QuickForm](http://pear.php.net/manual/en/package.html.html-quickform2.qf-migration.php) and [HTML\_QuickForm\_Controller](http://pear.php.net/manual/en/package.html.html-quickform2.controller-migration.php)
- [Form elements](http://pear.php.net/manual/en/package.html.html-quickform2.elements.php) overview
- [Elements' values and validation](http://pear.php.net/manual/en/package.html.html-quickform2.values.php)
- [Form output customization and Javascript support](http://pear.php.net/manual/en/package.html.html-quickform2.output.php)
- [Multipage forms](http://pear.php.net/manual/en/package.html.html-quickform2.multipage.php)

[Generated API documentation](http://pear.php.net/package/HTML_QuickForm2/docs/latest/) for the current release is also there.

Testing, Packaging and Installing (Pear)
----------------------------------------

[](#testing-packaging-and-installing-pear)

To test, run

```
$ phpunit tests/

```

after installing dependencies with composer. You can also test the installed package with

```
$ phpunit [PEAR tests dir]/HTML_QuickForm2

```

Since PEAR package needs its `require_once` statements re-enabled, please run the helper file before packaging and installing

```
$ php pear-package-helper.php

```

Then to build, simply

```
$ pear package .pear-package/package.xml

```

To install from scratch

```
$ pear install .pear-package/package.xml

```

To upgrade

```
$ pear upgrade -f .pear-package/package.xml

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 81.9% 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 ~386 days

Recently: every ~349 days

Total

11

Last Release

481d ago

PHP version history (2 changes)v2.2.0PHP &gt;=5.4.0

v2.3.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/169601c76b2d23fd5fd48d6e282f8cee5090b5b80742f436b962893dbaee29fb?d=identicon)[thedotedge](/maintainers/thedotedge)

---

Top Contributors

[![sad-spirit](https://avatars.githubusercontent.com/u/4820288?v=4)](https://github.com/sad-spirit "sad-spirit (358 commits)")[![golgote](https://avatars.githubusercontent.com/u/12360?v=4)](https://github.com/golgote "golgote (61 commits)")[![TheMY3](https://avatars.githubusercontent.com/u/9335727?v=4)](https://github.com/TheMY3 "TheMY3 (11 commits)")[![till](https://avatars.githubusercontent.com/u/27003?v=4)](https://github.com/till "till (3 commits)")[![CloCkWeRX](https://avatars.githubusercontent.com/u/365751?v=4)](https://github.com/CloCkWeRX "CloCkWeRX (2 commits)")[![sychova-fh](https://avatars.githubusercontent.com/u/64659584?v=4)](https://github.com/sychova-fh "sychova-fh (2 commits)")

---

Tags

validationjavascriptFormswizardPEARquickform

### Embed Badge

![Health badge](/badges/freelancehunt-html-quickform2/health.svg)

```
[![Health](https://phpackages.com/badges/freelancehunt-html-quickform2/health.svg)](https://phpackages.com/packages/freelancehunt-html-quickform2)
```

###  Alternatives

[pear/html_quickform2

Provides methods to create, validate and render HTML forms in PHP.

24498.9k2](/packages/pear-html-quickform2)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[fp/jsformvalidator-bundle

Javascript validation for sf\[2|3|4\] forms.

132418.8k1](/packages/fp-jsformvalidator-bundle)[apy/jsfv-bundle

Symfony2 Javascript Form Validation Bundle with localisation support

92770.5k](/packages/apy-jsfv-bundle)

PHPackages © 2026

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