Search⌘ K
AI Features

Overview of the EditForm Component

Explore the EditForm component in Blazor WebAssembly to handle user input with built-in validation and submission events. Understand how to use its callbacks and input components to build robust forms.

We'll cover the following...

So far, we have used the standard HTML form element to collect user input. However, the Blazor WebAssembly framework provides an enhanced version of the standard HTML form element called the EditForm component.

The EditForm component not only manages forms, but it also coordinates both validation and submission events. The following code shows an empty EditForm element:

HTML
<EditForm Model="expense" OnValidSubmit="HandleValidSubmit"></EditForm>
...