- Home
- /
- Design
- /
- DMBFormBuilder
- /
- Getting Started
Getting Started — FormBuilder
Start with the form shell, then migrate editors and captcha into dedicated components.
1. Reference the Package
Add DMBFormBuilder to the project that hosts your form views. It sits above PageBuilder and BootstrapBuilder in the DMB stack.
<PackageReference Include="DMBFormBuilder" Version="0.9.0" />2. Configure Services
Register FormBuilder services after PageBuilder and BootstrapBuilder so the form shell has access to the full rendering pipeline.
using DMBFormBuilder;
FormBuilderConfiguration.LoadCommonConfig(builder);3. Add the Namespace
Add the FormBuilder namespace to _ViewImports.cshtml to make form builders available in all your views.
@using DMBFormBuilder4. Create a Form
Compose a form shell with floating labels. Each field builder carries its own label presentation and Bootstrap-compatible validation display.
@using (Html.FormBuilder()
.SetAction("/Account/Login")
.SetValidationMode(FormValidationMode.ClientAndServer)
.DisableBrowserValidation()
.Begin())
{
@Html.TextFieldBuilderFor(m => m.Email)
.SetLabelPresentation(FormLabelPresentation.Floating)
.Render()
}Key Methods
Understand how FormBuilder layers on top of PageBuilder and BootstrapBuilder?
Check out the architecture guide to understand how FormBuilder is structured and integrates with the rendering lifecycle.
Architecture