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

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

castamir/forms
==============

Nette Forms: greatly facilitates web forms

v2.3.6(10y ago)0443BSD-3-ClausePHPPHP &gt;=5.3.1

Since May 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/castamir/forms)[ Packagist](https://packagist.org/packages/castamir/forms)[ Docs](https://nette.org)[ RSS](/packages/castamir-forms/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (25)Used By (0)

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

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

[![Downloads this Month](https://camo.githubusercontent.com/a07f995a34e0bd94bf8a1ab2b014cb34150cd7c1e440438fd925d42405820731/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e657474652f666f726d732e737667)](https://packagist.org/packages/nette/forms)[![Build Status](https://camo.githubusercontent.com/fd052a2492c25f5f10ecb99de0db6cf6ce14a29f23d24f07c2fa6a9331a8ecdc/68747470733a2f2f7472617669732d63692e6f72672f6e657474652f666f726d732e7376673f6272616e63683d76322e33)](https://travis-ci.org/nette/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 box and similar are checked for forged values upon validating. Sounds good? Let's try it out.

[See documentation](https://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 keep seeing this message until you meet the validation rules. All that is left for us is setting up JavaScript rules. Luckily it's a 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…](https://doc.nette.org/en/forms).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 87.2% 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 ~28 days

Recently: every ~12 days

Total

21

Last Release

3859d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1245190?v=4)[Miroslav Paulík](/maintainers/castamir)[@castamir](https://github.com/castamir)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (652 commits)")[![fprochazka](https://avatars.githubusercontent.com/u/158625?v=4)](https://github.com/fprochazka "fprochazka (8 commits)")[![vrana](https://avatars.githubusercontent.com/u/117453?v=4)](https://github.com/vrana "vrana (8 commits)")[![hrach](https://avatars.githubusercontent.com/u/284263?v=4)](https://github.com/hrach "hrach (7 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (7 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (6 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (6 commits)")[![Vrtak-CZ](https://avatars.githubusercontent.com/u/112567?v=4)](https://github.com/Vrtak-CZ "Vrtak-CZ (5 commits)")[![MartyIX](https://avatars.githubusercontent.com/u/203266?v=4)](https://github.com/MartyIX "MartyIX (5 commits)")[![fabik](https://avatars.githubusercontent.com/u/816866?v=4)](https://github.com/fabik "fabik (4 commits)")[![matej21](https://avatars.githubusercontent.com/u/1276059?v=4)](https://github.com/matej21 "matej21 (4 commits)")[![milo](https://avatars.githubusercontent.com/u/439140?v=4)](https://github.com/milo "milo (3 commits)")[![radekdostal](https://avatars.githubusercontent.com/u/375717?v=4)](https://github.com/radekdostal "radekdostal (3 commits)")[![tomaswindsor](https://avatars.githubusercontent.com/u/614249?v=4)](https://github.com/tomaswindsor "tomaswindsor (3 commits)")[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (3 commits)")[![mishak87](https://avatars.githubusercontent.com/u/276500?v=4)](https://github.com/mishak87 "mishak87 (2 commits)")[![romansklenar](https://avatars.githubusercontent.com/u/153201?v=4)](https://github.com/romansklenar "romansklenar (2 commits)")[![Ciki](https://avatars.githubusercontent.com/u/342730?v=4)](https://github.com/Ciki "Ciki (2 commits)")[![lm](https://avatars.githubusercontent.com/u/104171?v=4)](https://github.com/lm "lm (2 commits)")[![juzna](https://avatars.githubusercontent.com/u/227416?v=4)](https://github.com/juzna "juzna (2 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/castamir-forms/health.svg)](https://phpackages.com/packages/castamir-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)
