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

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

mistralys/html\_quickform2
==========================

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

2.3.6(1y ago)249.9k—0%2[6 issues](https://github.com/Mistralys/HTML_QuickForm2/issues)2BSD-3-ClausePHPPHP &gt;=7.4

Since Oct 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Mistralys/HTML_QuickForm2)[ Packagist](https://packagist.org/packages/mistralys/html_quickform2)[ Docs](https://github.com/Mistralys/HTML_QuickForm2)[ RSS](/packages/mistralys-html-quickform2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (21)Used By (2)

HTML QuickForm 2 - Mistralys fork
=================================

[](#html-quickform-2---mistralys-fork)

This fork focuses on code modernization, performance and quality of life improvements.

Requirements
------------

[](#requirements)

- PHP 7.4+ (PHP8 compatible)
- [Composer](https://getcomposer.org)

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

[](#installation)

Add as dependency to your `composer.json` file with:

```
composer require mistralys/html_quickform2

```

Also see the [Packagist page](https://packagist.org/packages/mistralys/html_quickform2).

Additions and improvements
--------------------------

[](#additions-and-improvements)

- Chainable element methods as alternative to attribute arrays.
- Element factory class for easy element creation.
- Better code completion support through typed return values.
- Ongoing overall code modernization with strict typing.
- Quality of life improvements overall.
- Removed dependencies on PEAR packages.

Some changes in detail:

- Elements: `set/getRuntimeProperty()` method to store data at runtime
- Default array datasource: `setValues()` method
- Textarea element: `setRows()` / `setColumns()` methods
- Elements: `makeOptional()` method to remove any required rules
- Elements: `hasErrors()` method to check if an element has errors after validation
- Elements: `getRules()` method to retrieve all rules added to the element
- Elements: `hasRules()` method to check if an element has any rules
- Elements: `addRuleXXX()` shorthand methods, including `addRuleRequired()`.
- Elements: `appendComment()` method to append text to an existing comment.
- Elements: `setComment()` extended to allow `Stringable` values.
- Elements: `isFrozen()` method to check if an element is frozen.
- Containers: `requireElementById()` with non-null return value.
- Text-based elements: `addFilterTrim()` method.
- Select element: `prependOption()` method to insert an element at the top.
- Select element: Support for selects with a custom OptGroup class.
- Select element: OptGroups `getLabel()` method.
- Select element: `countOptions()` method with recursive capability.
- Select Element: Added `makeMultiple()` and `isMultiple()`.
- Select Element: Added `setSize()` and `getSize()`.
- Select Element: Added `getSelectedOption()`.
- Date element: Setter and getter methods for options.
- Input elements: Added `setLabel()` method where relevant.
- Checkbox element: Added `setChecked()` method.
- Image element: Added `setURL()` method.
- Button Element: Added `makeSubmit()` and `makeButton()`.
- Form: Added `getMethod()`.
- Form: Added `makeMultiPart()` and `isMultiPart()`.
- Rules: The callback rule now has a method `getCallback()` to retrieve the configured callback.
- Rules: Added static `setDefaultMessage()` to the required rule.
- Renderers: Added setters and getters for renderer options.
- Renderers: Added specialized proxy classes to assist with IDE code completion.
- Renderers: Added proxy factory methods like `createArray()` and `createCallback()`.
- Renderers: Added a Bootstrap5 renderer.

Performance tweaks
------------------

[](#performance-tweaks)

- Container `getElementById()` method.
- Auto-generated element IDs.

Element ID generation
---------------------

[](#element-id-generation)

The element ID generation mechanism has been modified, so it is no longer possible to rely on a specific naming scheme to predict the automatic element IDs. In practice, this was impractical at best anyway, and the new system has big performance gains.

Documentation
=============

[](#documentation)

See the main branch for details and documentation: [https://github.com/pear/HTML\_QuickForm2](https://github.com/pear/HTML_QuickForm2)

Additional documentation is available in the [docs/knowledgebase](docs/knowledgebase) folder, in the form of Markdown files.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity67

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

Recently: every ~140 days

Total

19

Last Release

375d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8895528?v=4)[Mistralys](/maintainers/Mistralys)[@Mistralys](https://github.com/Mistralys)

---

Top Contributors

[![sad-spirit](https://avatars.githubusercontent.com/u/4820288?v=4)](https://github.com/sad-spirit "sad-spirit (310 commits)")[![Mistralys](https://avatars.githubusercontent.com/u/8895528?v=4)](https://github.com/Mistralys "Mistralys (293 commits)")[![golgote](https://avatars.githubusercontent.com/u/12360?v=4)](https://github.com/golgote "golgote (61 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)")

---

Tags

validationjavascriptFormswizardquickform

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[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)[pear/html_quickform2

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

24498.9k2](/packages/pear-html-quickform2)[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)
