PHPackages                             sodalto/forms - 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. sodalto/forms

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

sodalto/forms
=============

HTML form skeleton.

023PHP

Since Dec 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ltdangle/forms)[ Packagist](https://packagist.org/packages/sodalto/forms)[ RSS](/packages/sodalto-forms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Proof-of-concept skeleton for managing HTML forms in PHP.

Rationale:
----------

[](#rationale)

- Forms should be treated as first-class citizens. A decent form requires considerable amount of front-end customisation. More often than not existing generic form solutions would not suffice and become too complicated for anything besides pre-defined CRUD operations. It is expected that a form should be hand-crafted with minimal support (this library).
- Forms are self-contained units (don't spread form functionality over several classes). This also means that html (either raw html or templates) is embedded in the php form class, which is ...fine. The inspiration comes from Reactjs class based components with its JSX html-in-js syntax. This way you can use full power of the php language to describe your view logic, including IDE features such as refactorings and navigation. Coding slightly complex behavior in twig templates, for example, becomes tangled very quickly.
- Forms should be easily re-usable. You should be able to extend/modify a form just like you would any other php object.
- Forms should not rely on external validation libraries and rely on built-in php functions. The preferred approach is to use value objects where a value object would only accept valid values or throw an exception. The exception can then be caught and shown as a form error.

Usage instructions:
-------------------

[](#usage-instructions)

1. Create a value object that implements `ValueObjectInterface.php` The value object should always be in a valid state and has to throw an exception in the constructor if the passed value is invalid.
2. Create a form class and extend it from `AbstractForm.php`
3. Implement `_configureFormValues()` method in your form class.
4. Implement `setValues()` method in your form class.

Please see `tests/ContactForm.php` and `tests/ContactFormTest.php` for working example.

To be continued...

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b1515a3460f39fc31c545ba3ac796e91c0a9918d7025cbfc6baab9834b82323?d=identicon)[sodalto](/maintainers/sodalto)

---

Top Contributors

[![ltdangle](https://avatars.githubusercontent.com/u/2528468?v=4)](https://github.com/ltdangle "ltdangle (6 commits)")

### Embed Badge

![Health badge](/badges/sodalto-forms/health.svg)

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

###  Alternatives

[wdev-rs/laravel-analytics

Collect page view data in your application without third party tracking

151.2k](/packages/wdev-rs-laravel-analytics)

PHPackages © 2026

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