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

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

esports/forms
=============

Nette Forms: greatly facilitates web forms

2.2.x-dev(12y ago)021BSD-3-ClausePHPPHP &gt;=5.3.1

Since Apr 3Pushed 12y ago1 watchersCompare

[ Source](https://github.com/simara-esports/forms)[ Packagist](https://packagist.org/packages/esports/forms)[ Docs](http://nette.org)[ RSS](/packages/esports-forms/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Nette Forms: greatly facilitates web forms
==========================================

[](#nette-forms-greatly-facilitates-web-forms)

Nette\\Forms greatly facilitates creating and processing web forms. What it can really do?

- validate sent data both client-side (JavaScript) and server-side
- provide high level of security
- multiple render modes
- translations, i18n

Why should you bother setting up framework for a simple web form? You won't have to take care about routine tasks such as writing two validation scripts (client and server) and your code will be safe against security breaches.

Nette Framework puts a great effort to be safe and since forms are the most common user input, Nette forms are as good as impenetrable. All is maintained dynamically and transparently, nothing has to be set manually. Well known vulnerabilities such as Cross Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) are filtered, as well as special control characters. All inputs are checked for UTF-8 validity. Every multiple-choice, select boxe and similar are checked for forged values upon validating. Sounds good? Let's try it out.

[See documentation](http://doc.nette.org/en/forms).

First form
----------

[](#first-form)

Let's create a simple registration form:

```
use Nette\Forms\Form;

$form = new Form;

$form->addText('name', 'Name:');
$form->addPassword('password', 'Password:');
$form->addSubmit('send', 'Register');

echo $form; // renders the form
```

Though we mentioned validation, yet our form has none. Let's fix it. We require users to tell us their name, so we should call a `setRequired()` method, which optional argument is an error message to show, if user does not fill his name in:

```
$form->addText('name', 'Name:')
	->setRequired('Please fill your name.');
```

Try submitting a form without the name - you will se this very message until you meet the validation rules. All that is left for us is setting up JavaScript rules. Luckily it's an piece of cake. We only have to link `netteForms.js`, which is located at `/client-side/forms` in the distribution package.

```

```

Nette Framework adds `required` class to all mandatory elements. Adding the following style will turn label of *name* input to red.

```

.required label { color: maroon }

```

[Continue…](http://doc.nette.org/en/forms).

---

[![Build Status](https://camo.githubusercontent.com/120b13bee12d2195825e491142217c98f373c53a4200ae9759e1d880488ea21d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6e657474652f666f726d732e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/nette/forms)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.4% 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4471d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9b6ccf28b08e595ce916836e269131f3d0bf17d091a0df722733c897f73b3e5?d=identicon)[Svaťa Šimara](/maintainers/Sva%C5%A5a%20%C5%A0imara)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (529 commits)")[![vrana](https://avatars.githubusercontent.com/u/117453?v=4)](https://github.com/vrana "vrana (8 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (7 commits)")[![hrach](https://avatars.githubusercontent.com/u/284263?v=4)](https://github.com/hrach "hrach (7 commits)")[![fprochazka](https://avatars.githubusercontent.com/u/158625?v=4)](https://github.com/fprochazka "fprochazka (7 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (6 commits)")[![MartyIX](https://avatars.githubusercontent.com/u/203266?v=4)](https://github.com/MartyIX "MartyIX (5 commits)")[![Vrtak-CZ](https://avatars.githubusercontent.com/u/112567?v=4)](https://github.com/Vrtak-CZ "Vrtak-CZ (5 commits)")[![fabik](https://avatars.githubusercontent.com/u/816866?v=4)](https://github.com/fabik "fabik (4 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (3 commits)")[![tomaswindsor](https://avatars.githubusercontent.com/u/614249?v=4)](https://github.com/tomaswindsor "tomaswindsor (3 commits)")[![milo](https://avatars.githubusercontent.com/u/439140?v=4)](https://github.com/milo "milo (3 commits)")[![romansklenar](https://avatars.githubusercontent.com/u/153201?v=4)](https://github.com/romansklenar "romansklenar (2 commits)")[![smasty](https://avatars.githubusercontent.com/u/218524?v=4)](https://github.com/smasty "smasty (2 commits)")[![lm](https://avatars.githubusercontent.com/u/104171?v=4)](https://github.com/lm "lm (2 commits)")[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (2 commits)")[![norbe](https://avatars.githubusercontent.com/u/194486?v=4)](https://github.com/norbe "norbe (2 commits)")[![jiripudil](https://avatars.githubusercontent.com/u/1042159?v=4)](https://github.com/jiripudil "jiripudil (2 commits)")[![juzna](https://avatars.githubusercontent.com/u/227416?v=4)](https://github.com/juzna "juzna (2 commits)")[![ZZromanZZ](https://avatars.githubusercontent.com/u/99749?v=4)](https://github.com/ZZromanZZ "ZZromanZZ (1 commits)")

### Embed Badge

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

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

###  Alternatives

[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.3k69.7M717](/packages/nette-php-generator)[nette/component-model

⚛ Nette Component Model

28817.0M101](/packages/nette-component-model)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

53013.5M486](/packages/nette-forms)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5275.7M110](/packages/symplify-monorepo-builder)[nextras/datagrid

Datagrid component for Nette Framework.

71270.4k4](/packages/nextras-datagrid)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20276.8k20](/packages/shopsys-coding-standards)

PHPackages © 2026

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