PHPackages                             ms1570p/zend-form-element-discovery - 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. ms1570p/zend-form-element-discovery

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

ms1570p/zend-form-element-discovery
===================================

04PHP

Since Sep 12Pushed 8y agoCompare

[ Source](https://github.com/ms1570p/ZendFormElementDiscovery)[ Packagist](https://packagist.org/packages/ms1570p/zend-form-element-discovery)[ RSS](/packages/ms1570p-zend-form-element-discovery/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ZendFormElementDiscovery
========================

[](#zendformelementdiscovery)

Description
-----------

[](#description)

This library automatically creates form inputs depends on database schema and field name. It automatically assign some validators and filters, for example StringLength or Required depends on database schema.

\##Installation

Add to your composer.json:

```
"require": {
    ...
    "ms1570p/zend-form-element-discovery": "dev-master"
}

```

Working with ZendFormElementDiscovery
-------------------------------------

[](#working-with-zendformelementdiscovery)

In your form simply add this trait:

```
use ms1570p\ZendFormElementDiscovery\ZendFormElementDiscoveryTrait;
```

and now you can use the main method called:

```
addElementDiscovery()
```

Example
-------

[](#example)

```
use Model_DbTable_Users as Users;

class Default_Form_Register extends Twitter_Bootstrap3_Form_Vertical
{
    use ms1570p\ZendFormElementDiscovery\ZendFormElementDiscoveryTrait;

    public function init()
    {
        $this->addElementDiscovery(Users::model(), 'firstname');
        $this->addElementDiscovery(Users::model(), 'lastname');
        $this->addElementDiscovery(Users::model(), 'email', [
            'validators' => [
                ['Db_NoRecordExists', false, [
                    'table' => 'users',
                    'field' => 'email',
                ]]
            ],
        ]);
        $this->addElementDiscovery(Users::model(), 'password');
    }
}
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/cc3cc3ac0a7374e5b96075382a1439371d287f03bef38a1fccaf61008705758a?d=identicon)[ms1570p](/maintainers/ms1570p)

---

Top Contributors

[![p0751sm](https://avatars.githubusercontent.com/u/31902699?v=4)](https://github.com/p0751sm "p0751sm (2 commits)")

### Embed Badge

![Health badge](/badges/ms1570p-zend-form-element-discovery/health.svg)

```
[![Health](https://phpackages.com/badges/ms1570p-zend-form-element-discovery/health.svg)](https://phpackages.com/packages/ms1570p-zend-form-element-discovery)
```

###  Alternatives

[aune-io/magento2-product-category-url-fix

Product category url fix for Magento 2

165.9k](/packages/aune-io-magento2-product-category-url-fix)

PHPackages © 2026

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