PHPackages                             romm/formz - 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. romm/formz

AbandonedArchivedTypo3-cms-extension[Templating &amp; Views](/categories/templating)

romm/formz
==========

Manage your forms easily with powerful tools: TypoScript based validation, Fluid view helpers, a whole JavaScript API, and more. Use pre-defined layouts for Twitter Bootstrap and Foundation to build nice-looking forms in minutes. Need to build a basic form with only two fields? Need to build a huge registration form with dozens of fields? Use FormZ, it will live up to your expectations! Visit typo3-formz.com for more information.

1.2.0(8y ago)1014.8k5[4 PRs](https://github.com/romm/formz/pulls)GPL-3.0+PHPPHP &gt;=5.5

Since Oct 2Pushed 3y ago10 watchersCompare

[ Source](https://github.com/romm/formz)[ Packagist](https://packagist.org/packages/romm/formz)[ Docs](http://typo3-formz.com/)[ RSS](/packages/romm-formz/feed)WikiDiscussions development Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (26)Used By (0)

[![FormZ](Documentation/Images/formz-icon@medium.png)](Documentation/Images/formz-icon@medium.png) FormZ • Modern form handler
==============================================================================================================================

[](#-formz--modern-form-handler)

> **Warning** This package is no longer maintained.

ℹ️ Show more info> [![Build Status](https://camo.githubusercontent.com/655f2c69e50b3260a1f5a476696b6c6cb1ebdfbff0ae723352631a15fc1b721c/68747470733a2f2f7472617669732d63692e6f72672f726f6d6d2f666f726d7a2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/romm/formz) [![Coverage Status](https://camo.githubusercontent.com/96bfeb766cda27c43cb86b7d0dd6e950fea4443d41f1a4431dc2a4984ce19c42/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f726f6d6d2f666f726d7a2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/romm/formz?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/9587daa1038ca13a45a72a3ac7249ace90b47735027a495eb2959c87e1bd7bef/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f6d6d2f666f726d7a2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/romm/formz/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/0440abd76bc841301ccf72d63deb071e84f44c5728649b32934c5dc59828900c/68747470733a2f2f706f7365722e707567782e6f72672f726f6d6d2f666f726d7a2f762f737461626c65)](https://packagist.org/packages/romm/formz) [![Total Downloads](https://camo.githubusercontent.com/3c6b69e90221f8a7477f7c1972e442f8109980a4a7fe8a8c53e1d1774b7cb66e/68747470733a2f2f706f7365722e707567782e6f72672f726f6d6d2f666f726d7a2f646f776e6c6f616473)](https://packagist.org/packages/romm/formz) [![SensioLabs Insight](https://camo.githubusercontent.com/4624a1c11f9d8c65867cef66753ad384fc6b58d3516c8fb7e13f136077787220/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f39656335386665332d336536632d343532342d383262642d6236653261313438323461322e737667)](https://insight.sensiolabs.com/projects/9ec58fe3-3e6c-4524-82bd-b6e2a14824a2) [![StyleCI](https://camo.githubusercontent.com/1f8cd6052db4229f4c3aedf8381cbff74530b02dd888439490b22b33ddee8057/68747470733a2f2f7374796c6563692e696f2f7265706f732f36393832313236302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/69821260)

> **→ [FormZ official website](http://typo3-formz.com/)**

> “Manage your forms easily with powerful tools: TypoScript based validation, Fluid view helpers, a whole JavaScript API, and more. Use pre-defined layouts for Twitter Bootstrap and Foundation to build nice-looking forms in minutes. Need to build a basic form with only two fields? Need to build a huge registration form with dozens of fields? Use FormZ, it will live up to your expectations!”

> ❗ *This PHP library has been developed for [![TYPO3](Resources/Public/Images/typo3-icon.png)TYPO3 CMS](https://typo3.org) and is intended to TYPO3 extension developers.*

> [![Slack](Documentation/Images/slack-icon.png)](Documentation/Images/slack-icon.png) Join the discussion on Slack in channel [**\#ext-formz**](https://typo3.slack.com/messages/ext-formz)! – You don't have access to TYPO3 Slack? Get your Slack invitation [by clicking here](https://forger.typo3.org/slack)!

---

Introduction
------------

[](#introduction)

Forms are **common elements in the conception of a website**, as they allow a **direct interaction** between the user and the application. Technically, setting up a form can quickly become **complex** and require a **lot of time**: many aspects must be considered: **style, display conditions, validation, security**…

This is why FormZ was born: to facilitate the **set up** and the **maintenance** of a form, by providing tools that are **simple and fast to use**, but also **powerful and flexible** enough to fulfill every need.

FormZ helps with the following topics:

- **HTML** – tools are provided for Fluid, to facilitate integration.
- **Validation** – with a TypoScript based configuration, every field's validation rule is easy to set up and maintain.
- **Style** – an advanced “data attributes” system allows FormZ to fulfill almost all possible display needs.
- **UX** – a whole JavaScript API is provided to make the user experience as fast and as pleasant as possible.
- **Code generation** – FormZ can generate JavaScript and CSS, which are then injected into the page and will automatize a huge part of the client-sided behaviours.

Example
-------

[](#example)

Nothing can be more interesting than a little example to understand how it works.

➡️ You can download an extension which provides a form example here: [https://github.com/romm/formz\_example/](https://github.com/romm/formz_example/)

---

**Live example:**

[![FormZ](Documentation/Images/formz-example.gif)](Documentation/Images/formz-example.gif)

---

**TypoScript configuration:**

```
config.tx_formz {
    forms {
        Romm\FormzExample\Form\ExampleForm {
            fields {
                name {
                    validation {
                        required < config.tx_formz.validators.required
                    }
                }

                firstName {
                    validation {
                        required < config.tx_formz.validators.required
                    }
                }

                email {
                    validation {
                        required < config.tx_formz.validators.required
                        isEmail < config.tx_formz.validators.email
                    }
                    behaviours {
                        toLowerCase < config.tx_formz.behaviours.toLowerCase
                    }
                }

                gender {
                    validation {
                        required < config.tx_formz.validators.required

                        isValid < config.tx_formz.validators.containsValues
                        isValid {
                            options {
                                values {
                                    10 = male
                                    20 = female
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

```

**PHP form model:**

```
