PHPackages                             horde/form - 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. horde/form

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

horde/form
==========

Form library

v3.0.0beta7(2mo ago)11.7k↑150%511LGPL-2.1-onlyPHPPHP ^7.4 || ^8CI failing

Since Oct 25Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/horde/Form)[ Packagist](https://packagist.org/packages/horde/form)[ Docs](https://www.horde.org/libraries/Horde_Form)[ RSS](/packages/horde-form/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced 1mo ago

READMEChangelogDependencies (24)Versions (41)Used By (11)

Horde/Form Library
==================

[](#hordeform-library)

AI autogenerated may 17th 2025

Overview
--------

[](#overview)

Horde/Form is a powerful and flexible form handling library that provides a comprehensive set of tools for creating, validating, and processing web forms in PHP applications. It's part of the Horde Application Framework and offers a robust solution for form management with extensive field types and validation capabilities.

UPGRADING FROM FORMS v2
-----------------------

[](#upgrading-from-forms-v2)

### Minimum

[](#minimum)

Forms v3 lib/ folder contains a straight conversion of Forms v2 with the following BC breaking changes:

- Most parameters have been changed to NOT use references for primitives. I.e. derived forms and types need to drop the &amp; from parameter signatures
- $type-&gt;getInfo($vars, &amp;$info) calls now must be $info = $type-&gt;getInfo($vars, $info);
- $bValid = $type-&gt;isValid($var, $vars, $value, $message); no longer updates the $message parameter. You need to call $type-&gt;getMessage() after $type-&gt;isValid if you want to retrieve a potentially set message

This code base is only for easily upgrading existing libraries and apps to Horde 6. It will be deprecated in the next minor release v3.1 and removed in the next major release V4.

### Namespaced

[](#namespaced)

A version with more BC breaking changes is introduced in the src/V3 folder

- Class names follow strict PSR-4 scheme, i.e. Horde\_Form\_Type\_text -&gt; Horde\\Form\\V3\\TextType
- Signatures based on interfaces, deriving from base class is optional
- Proper PER-CS styled code base including types, dropping underscores for properties etc
- This version will be deprecated in V4 and dropped in V5

### V4

[](#v4)

- A more involved redesign of Forms based on PHP 8.4 features such as property hooks

Features
--------

[](#features)

### Form Field Types

[](#form-field-types)

The library supports a wide variety of form field types including:

- Basic Input Types:

    - Text fields
    - Password fields
    - Number fields
    - Email fields
    - Phone numbers
    - IP addresses (IPv4 and IPv6)
    - Long text areas
    - File uploads
    - Image uploads
- Selection Types:

    - Dropdown menus (enum)
    - Radio buttons
    - Checkboxes
    - Multi-select lists
    - Matrix inputs
    - Category selectors
- Date and Time:

    - Date pickers
    - Time selectors
    - DateTime combinations
    - Month/Year selectors
- Special Types:

    - Color pickers
    - Sound selectors
    - Credit card validators
    - CAPTCHA support
    - PGP/SMIME input
    - Address fields
    - Country selectors

### Key Features

[](#key-features)

1. **Validation System**

    - Built-in validation for all field types
    - Custom validation support
    - File upload validation
    - Image processing capabilities
2. **Security**

    - CSRF protection
    - File upload security
    - Input sanitization
    - Password confirmation support
3. **Flexibility**

    - Custom field type creation
    - Extensible validation rules
    - Configurable field properties
    - Support for multiple languages
4. **Integration**

    - Seamless integration with Horde Framework
    - Support for various storage backends
    - Database lookup capabilities
    - File system integration

Usage
-----

[](#usage)

```
// Example of creating a form
$form = new Horde_Form($vars);
$form->addVariable('Username', 'username', 'text', true);
$form->addVariable('Email', 'email', 'email', true);
$form->addVariable('Password', 'password', 'password', true);

// Validate form
if ($form->validate($vars)) {
    // Process form data
}
```

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

[](#requirements)

- PHP 7.0 or higher
- Horde Framework dependencies
- Required PHP extensions (varies by field type)

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

[](#installation)

```
composer require horde/form
```

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

[](#documentation)

For detailed documentation, please refer to the Horde documentation at: [https://www.horde.org/libraries/Horde\_Form](https://www.horde.org/libraries/Horde_Form)

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

See the LICENSE file for details.

Support
-------

[](#support)

For support, please use the Horde mailing lists or issue tracker:

- Mailing List:
- Issue Tracker:

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance85

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community34

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 59.3% 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 ~168 days

Recently: every ~64 days

Total

28

Last Release

62d ago

Major Versions

2.0.20 → 3.0.0alpha22021-02-24

PHP version history (6 changes)2.0.6PHP &gt;=5.3.0

2.0.9PHP &gt;=5.3.0,&lt;=6.0.0alpha1

2.0.12PHP &gt;=5.3.0,&lt;=8.0.0alpha1

2.0.18PHP ^5.3 || ^7

3.0.0alpha2PHP ^7

v3.0.0alpha4PHP ^7.4 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/c943a083635c28520599075eaea7ede2d743b7697b76e84d6bdc37e52cc8249b?d=identicon)[yunosh](/maintainers/yunosh)

![](https://www.gravatar.com/avatar/c931cd02664859360478593450d6c473a05bb12b209dfacfc534cd13257cc7ef?d=identicon)[ralflang](/maintainers/ralflang)

![](https://www.gravatar.com/avatar/e4f6c6771993db2ed500959b42353f6cf6a2ca0406d9617f7ae680f4504faa4a?d=identicon)[horde](/maintainers/horde)

![](https://www.gravatar.com/avatar/a7767adb66b45f2f05bcd44d49bc4e67efacd9ce05b161ce2d481d5dd6af025c?d=identicon)[mrubinsk](/maintainers/mrubinsk)

---

Top Contributors

[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (288 commits)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (50 commits)")[![mrubinsk](https://avatars.githubusercontent.com/u/66822?v=4)](https://github.com/mrubinsk "mrubinsk (48 commits)")[![amulet1](https://avatars.githubusercontent.com/u/18431541?v=4)](https://github.com/amulet1 "amulet1 (43 commits)")[![slusarz](https://avatars.githubusercontent.com/u/381003?v=4)](https://github.com/slusarz "slusarz (38 commits)")[![TDannhauer](https://avatars.githubusercontent.com/u/6716033?v=4)](https://github.com/TDannhauer "TDannhauer (8 commits)")[![wrobel](https://avatars.githubusercontent.com/u/10232?v=4)](https://github.com/wrobel "wrobel (3 commits)")[![oakey-b1](https://avatars.githubusercontent.com/u/14907501?v=4)](https://github.com/oakey-b1 "oakey-b1 (2 commits)")[![renan](https://avatars.githubusercontent.com/u/28046?v=4)](https://github.com/renan "renan (2 commits)")[![bklang](https://avatars.githubusercontent.com/u/167131?v=4)](https://github.com/bklang "bklang (1 commits)")[![ikselven](https://avatars.githubusercontent.com/u/10441332?v=4)](https://github.com/ikselven "ikselven (1 commits)")[![Schlue](https://avatars.githubusercontent.com/u/10165635?v=4)](https://github.com/Schlue "Schlue (1 commits)")[![dulinux](https://avatars.githubusercontent.com/u/539696?v=4)](https://github.com/dulinux "dulinux (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/horde-form/health.svg)

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

###  Alternatives

[horde/horde

Horde base application

581.7k34](/packages/horde-horde)[horde/imap_client

IMAP client library

263.3k8](/packages/horde-imap-client)

PHPackages © 2026

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