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

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

chomenko/extra-form
===================

v3.0.7(6y ago)07131[1 issues](https://github.com/chomenko/ExtraForm/issues)1PHPPHP &gt;=5.6

Since Mar 8Pushed 6y agoCompare

[ Source](https://github.com/chomenko/ExtraForm)[ Packagist](https://packagist.org/packages/chomenko/extra-form)[ Docs](https://github.com/chomenko/ExtraForm)[ RSS](/packages/chomenko-extra-form/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (5)Versions (17)Used By (1)

Extra Form
==========

[](#extra-form)

What do you do?

- Ability to work with the entity
- Rendering bootstrap style
    - **Grid** allows you to create custom layouts without using templates
    - Input group
- Allows you to use it [symfony/validator](https://github.com/symfony/validator) in entities
- Can be used on relation entity pairs list

Required:

- nette/di
- nette/forms
- symfony/validator
- kdyby/doctrine
- [nettpack/stage](https://github.com/nettpack/stage)

### Install

[](#install)

```
$ composer require chomenko/extra-form
```

### Configure

[](#configure)

```
extensions:
	ExtraForm: Chomenko\ExtraForm\DI\ExtraFormExtension
```

Events
------

[](#events)

Look on this example [Simple event](src/Examples/SimpleEvent). Service tag `extraForm.events`.

If you do not use [auto-install](https://github.com/chomenko/AutoInstall).

```
services:
	SimpleEvent:
		class: Examples\SimpleEvent\Event
		tags: ["extraForm.events"]
```

**Form events**

- CRETE\_FORM
- INSTALL\_ENTITY
- BEFORE\_ADD\_COMPONENT
- ADD\_COMPONENT
- BEFORE\_RENDER
- AFTER\_RENDER

**Elements events**

- ATTACHED
- INSTALLED
- SET\_OPTION
- ADD\_CONSTRAINT
- LOAD\_HTTP\_DATA
- AFTER\_LOAD\_HTTP\_DATA
- SET\_ITEMS
- SET\_VALUE
- RENDER

*There are not all things I want now.*

Examples
--------

[](#examples)

To create the first form, look at the class [Chomenko\\ExtraForm\\FormFactory](src/FormFactory.php)

**Entity forms**

- [Simple form](src/Examples/EntityForm)
- [With use symfony assert](src/Examples/EntityFormAssert)
- [Pairs list](src/Examples/EntityFormPairs)
- [Join pairs list](src/Examples/EntityFormPairsJoin)
- [Relation pairs OneToMany -&gt;relation record&lt;- ManyToOne](src/Examples/EntityFormPairsJoin)

**Events**

- [Simple event](src/Examples/SimpleEvent)

Rendering
---------

[](#rendering)

Builder preserve the order of the elements, so if you need to edit only two elements, you do not have to edit the whole form

```
