Skip to content

Form designer

BormDesigner builds a form without code. Add fields from the palette, choose one to edit its properties - which are a Borm form of their own - and watch the preview and the JSON Schema follow. Every change is a BormDefinition, handed out through @bind-Value.

It opens on a small contact form. Choose a field, change its label, make it required or give it a condition such as {Topic} = 'billing'; move fields with the arrow buttons (or drag them); paste a JSON Schema of your own into the box at the bottom and load it. The list is buttons first, so it works from the keyboard and every change is announced.

Add a field

Fields

Properties

An expression, such as {Country} = 'NL' or {Quantity} * {Price}.

Form

Preview

Contact us

JSON Schema

The form has 5 field(s).

View source
@page "/designer"

<BormDesigner @bind-Value="_definition" />

@code {
    // An existing form to edit - or null to start from nothing. Whatever the designer has no place for
    // (an options provider, a condition written in code, steps) is kept as it is.
    private BormDefinition? _definition = BormBuilder.Create()
        .Title("Contact us")
        .Text("Name", f => f.Required())
        .Email("Email", f => f.Required())
        .Select("Topic", f => f.Options(("sales", "Sales"), ("billing", "Billing"), ("other", "Something else")))
        .Text("Invoice", f => f.Label("Invoice number").VisibleWhen("{Topic} = 'billing'"))
        .TextArea("Message", f => f.Required().MaxLength(1000))
        .Build();
}
An unhandled error has occurred. Reload 🗙