nette/claude-code/nette-forms
- community
Checking that the SKILL.md file is still in the repository.
Invoke before creating or modifying Nette Forms. Provides form controls, validation, rendering patterns. Use when working with form factories, form controls, validation rules, form events, rendering forms in Latte, Bootstrap integration, form containers, or form error handling. Also trigger for $form/$data in Nette context.
Install
npx vskill@latest install nette/claude-code/nette-formsSKILL.md
Nette Forms
Nette Forms provides secure, reusable forms with automatic validation on both client and server side.
Forms in Presenters
Use `Nette\Application\UI\Form`, not `Nette\Forms\Form`. The former extends the latter and adds SignalReceiver, so it can pick up the submit signal and reach the presenter; Nette\Forms\Form is the standalone variant and will not receive submitted data as a presenter component.
Forms are created in factory methods named createComponent<Name>:
Render in template:
Create and Edit Pattern
Unified form for both creating and editing records:
Template:
Defaults are set in actionEdit() via $form->setDefaults() – never set defaults in the template.
Form Reuse with Factory
A common base FormFactory creates Form instances with shared configuration (CSRF, renderer, translation). Changing it in one place affects all forms in the application – no need to hunt through individual presenters:
CSRF protection is built in and needs no hidden token. A form that must accept a cross-origin POST calls $form->allowCrossOrigin(); there is no setCrossOrigin().
For specific forms used in multiple places, create a dedicated factory:
Use in presenter:
Common Form Controls
| Method | Creates | |
|---|---|---|
addText($name, $label) | Text input | |
addPassword($name, $label) | Password input | |
addTextArea($name, $label) | Multi-line text | |
addEmail($name, $label) | Email with validation | |
addInteger($name, $label) | Integer input | |
addFloat($name, $label) | Decimal input | |
addCheckbox($name, $caption) | Checkbox | |
addCheckboxList($name, $label, $items) | Multiple checkboxes | |
addRadioList($name, $label, $items) | Radio buttons | |
addSelect($name, $label, $items) | Dropdown | |
addMultiSelect($name, $label, $items) | Multi-select | |
addUpload($name, $label) | File upload | |
addMultiUpload($name, $label) | Multiple files | |
addDate($name, $label) | Date picker | |
addTime($name, $label) | Time picker | |
addDateTime($name, $label) | Combined date+time picker | |
addHidden($name) | Hidden field | |
addSubmit($name, $caption) | Submit button | |
addButton($name, $caption) | Button |
See the complete control reference for all form controls.
Basic Validation
Mark every required field with setRequired(). Rules added by addRule() run only when the control is filled, so an empty field passes them all and its empty value reaches onSuccess.
See the complete validation reference for all rules and conditions.
Conditional Validation
Form Rendering
Default rendering:
Manual rendering:
With Bootstrap:
See the complete rendering reference for all rendering options.
Form Events
Error Handling
redirect() works by throwing AbortException (a \LogicException), so keep it outside the try: a catch-all \Exception there would swallow the redirect.
Documentation
The full Nette documentation for this topic is bundled with the plugin. Read a page when you need details beyond this skill:
- Forms in Presenters – creating, processing, defaults, CSRF
- Standalone Forms – forms without Nette Application
- Form Controls – every
add*()method with its options - Validation – rules, conditions, error messages, JavaScript
- Rendering – Latte, renderers, Bootstrap
- Custom Controls – writing your own control
- Configuration – the
forms:section - Form Reuse – sharing forms between presenters
- Create and Edit Form – one form for both operations
- Contact Form – a complete example
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/nette/skills/nette-forms/SKILL.md
Popularity
- Repository stars
- 37
- Repository forks
- 4
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nette/claude-code/nette-forms)