PHPackages                             bupy7/zf-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. [Templating &amp; Views](/categories/templating)
4. /
5. bupy7/zf-form

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

bupy7/zf-form
=============

The simplest form for Laminas.

2.0.0(5y ago)26321BSD-3-ClausePHPPHP ^5.6 || ^7.0

Since Aug 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bupy7/zf-form)[ Packagist](https://packagist.org/packages/bupy7/zf-form)[ RSS](/packages/bupy7-zf-form/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (10)Versions (12)Used By (1)

zf-form
=======

[](#zf-form)

[![Latest Stable Version](https://camo.githubusercontent.com/2a940915e1804f23006a20b323e41e13d1d1369a462cd51f5bd7a2073e20618d/68747470733a2f2f706f7365722e707567782e6f72672f62757079372f7a662d666f726d2f762f737461626c65)](https://packagist.org/packages/bupy7/zf-form)[![Total Downloads](https://camo.githubusercontent.com/3047ddd2fef5db3d3702969349626271241a42d5ace1f017f61e5bc116422d45/68747470733a2f2f706f7365722e707567782e6f72672f62757079372f7a662d666f726d2f646f776e6c6f616473)](https://packagist.org/packages/bupy7/zf-form)[![Latest Unstable Version](https://camo.githubusercontent.com/74d0da7797053044f428eebec9bce88d318141535fb092c51a6035101865cc69/68747470733a2f2f706f7365722e707567782e6f72672f62757079372f7a662d666f726d2f762f756e737461626c65)](https://packagist.org/packages/bupy7/zf-form)[![License](https://camo.githubusercontent.com/b57b9d49e4e6d095ad067cf70c21daa532287e7e9a79de09bfdbce7298d0e703/68747470733a2f2f706f7365722e707567782e6f72672f62757079372f7a662d666f726d2f6c6963656e7365)](https://packagist.org/packages/bupy7/zf-form)[![Build Status](https://camo.githubusercontent.com/2f957ab47fb61e4081019a18bc3ca3b55ed2f0d515bfb5243bd5d1dd91bd9df5/68747470733a2f2f7472617669732d63692e6f72672f62757079372f7a662d666f726d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bupy7/zf-form)[![Coverage Status](https://camo.githubusercontent.com/a83f10003f53555b9f5a5257037fd4d732d97ae8df5243729fffc3835c9f47b7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f62757079372f7a662d666f726d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/bupy7/zf-form?branch=master)

Simple and powerful form with [`laminas/laminas-inputfilter`](https://github.com/laminas/laminas-inputfilter)and [`bupy7/php-html-form`](https://github.com/bupy7/php-html-form).

> If you want to use only form input filter I recomend to you [php-input-filter](https://github.com/bupy7/php-input-filter) instead. In the future this package (`zf-form`) will work together with `php-input-filter`.

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

[](#installation)

The preferred way to install this extension is through composer.

Either run

```
$ php composer.phar require bupy7/zf-form "*"

```

or add

```
"bupy7/zf-form": "*"

```

to the require section of your composer.json file.

Usage
-----

[](#usage)

Form:

```
// module/Application/src/Form/SignInForm.php

use Bupy7\Form\FormAbstract;

class SignInForm extends FormAbstract
{
    /**
     * @var string
     */
    public $email;
    /**
     * @var string
     */
    public $password;

    protected function inputs()
    {
        return [
            [
                'name' => 'email',
                'required' => true,
                'validators' => [
                    [
                        'name' => 'EmailAddress',
                    ],
                ],
            ],
            [
                'name' => 'password',
                'required' => true,
            ],
        ];
    }
}
```

View:

```
// module/Application/view/auth/signin.phtml
