Introduction — FormBuilder

Forms expressed through PageBuilder and BootstrapBuilder conventions.

PageBuilder Foundation

Attributes, data values and classes are composed through the same fluent HTML model as the other DMB builders.

Bootstrap Presentation

Forms can declare normal or floating label intent and keep Bootstrap validation semantics at the form level.

Extensible Fields

Editors, validation surfaces and captcha composition can move into this dedicated package as the field API grows.

What is FormBuilder?

DMBFormBuilder is the form-oriented layer of the DMB stack. It hosts the form composition rules that would otherwise be scattered between Razor views, editor helpers and security widgets.

The package provides a PageBuilder-backed <form> builder that understands Bootstrap validation classes, label presentation choices and form-level HTML attributes — keeping form concerns explicit and composable.

Bootstrap Validation Semantics: Form-level validation state maps directly to Bootstrap classes — no manual class toggling in views.
Floating Label Support: Switch between normal and floating label presentation with a single builder call, consistently applied to the whole form.
Extensible Field Model: The field API is designed to grow — editors, captcha widgets and custom validation surfaces can be added without changing the form shell.
Html.FormBuilder()
    .SetFloatingLabel()
    .AddField(m => m.Email)
    .AddField(m => m.Password)
    .Render()

A form shell with floating labels composed through the fluent builder API.

Three Pillars of FormBuilder

FormBuilder is organised around three areas that cover the full form composition lifecycle.

PageBuilder Foundation

Attributes, data values and classes are composed through the same fluent HTML model as the other DMB builders.

.FormBuilder()
Bootstrap Presentation

Forms can declare normal or floating label intent and keep Bootstrap validation semantics at the form level.

.SetFloatingLabel()
Extensible Fields

Editors, validation surfaces and captcha composition can move into this dedicated package as the field API grows.

.AddField(...)

Core Philosophy

We believe form composition should follow the same fluent, explicit model as the rest of the stack. When you write Html.FormBuilder().SetFloatingLabel() , you express the intent — the builder handles Bootstrap form classes, validation attributes, and HTML structure consistently.

Next Step

Learn the minimal configuration pattern and start composing your first form.

Getting Started