collect-user-input

Build and validate Blazor forms across SSR and interactive render modes.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill collect-user-input-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: collect-user-input
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/collect-user-input
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill collect-user-input-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Blazor developers must handle forms differently depending on the app's interactivity mode, and using the wrong pattern causes silent failures like ignored validation attributes, null models on GET requests, or broken submissions in Static SSR. ## Core Features & Use Cases - EditForm Patterns: Set up Model-based or EditContext-based forms that work in both Static SSR and interactive Server/WebAssembly modes, with correct use of FormName and SupplyParameterFromForm. - Validation: Apply DataAnnotationsValidator, per-field ValidationMessage components, and custom validator components for server-side business rules like uniqueness checks. - Input Handling & File Upload: Use built-in input components, @bind:after reactions, real-time @oninput filtering, and InputFile uploads with stream size limits. - Use Case: You are adding a registration form to a Blazor app with per-page interactivity. This Skill guides you to use FormName plus SupplyParameterFromForm for the static pages and @bind-Value with DataAnnotationsValidator for interactive pages, avoiding double-submission and antiforgery pitfalls. ## Quick Start Ask the agent to add a validated contact form with name, email, and message fields to your Blazor page, respecting the interactivity mode defined in your project's AGENTS.md.

Frequently Asked Questions about collect-user-input

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a form in Blazor with validation?

Use EditForm with a Model, add DataAnnotationsValidator inside the form, and bind inputs with @bind-Value. Define rules with attributes like Required, StringLength, and Range on the model, then display errors with ValidationSummary or ValidationMessage.

How do Blazor forms work in Static SSR mode?

In Static SSR, use EditForm with a unique FormName and bind POST data via a property decorated with SupplyParameterFromForm. Initialize the model with ??= in OnInitialized, since @bind and @onchange require interactivity and will not work.

Can I use InputFile for uploads in Blazor Static SSR?

No, InputFile requires an interactive render mode such as Server or WebAssembly. In interactive mode, handle uploads with OnChange and read the file via OpenReadStream, setting maxAllowedSize to control stream limits.

Why is my Blazor form validation not working?

The most common cause is a missing DataAnnotationsValidator component inside EditForm, which silently disables annotation-based validation. Also verify you are not combining OnSubmit with OnValidSubmit, since those handlers are mutually exclusive.

How do I handle multiple forms on one Blazor page?

Give each EditForm a unique FormName and match each model property with SupplyParameterFromForm using the same FormName value. Without unique names, both forms fire on any submission in SSR.