# ASP.NET MVC Form Overview

The Telerik UI Form HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI Form widget.

The Telerik UI Form for ASP.NET MVC allows you to generate and manage forms. Through a variety of configuration options, it makes creating and customizing forms a seamless experience. Achieve the desired form appearance by using default or custom editors, choose layout and orientation, display the editors in groups and columns, and configure validation.

* [Demo page for the Form HtmlHelper](https://demos.telerik.com/aspnet-mvc/form/index)

## Initializing the Form

The following example demonstrates how to define the Form.

```Razor HtmlHelper
    @(Html.Kendo().Form<MyApplication.Models.UserViewModel>()
        .Name("formExample")
        //configure the action and method attributes of the HTML <form> element
        .HtmlAttributes(new { action = @Url.Action("MyAction","MyController"), method = "POST" })
        .Items(items =>
        {
            items.Add()
                .Field(f => f.FirstName)
                .Label(l => l.Text("First Name:"));
            items.Add()
                .Field(f => f.LastName)
                .Label(l => l.Text("Last Name:"));
            items.Add()
                .Field(f => f.UserName)
                .Label(l => l.Text("Username:"));
            items.Add()
                .Field(f => f.Password)
                .Label(l => l.Text("Password:"))
                .Hint("Hint: enter alphanumeric characters only.");
        })
    )
```

Similar to the [`Html.BeginForm`](https://learn.microsoft.com/en-us/dotnet/api/system.web.mvc.html.formextensions.beginform?view=aspnet-mvc-5.2#system-web-mvc-html-formextensions-beginform\(system-web-mvc-htmlhelper\)), the Form component generates a `<form>` HTML element. The `form` element has a `POST` method and the submit request is processed by the respective action method for the view. You can customize these options through the `HtmlAttributes()` method: `HtmlAttributes(new { action = @Url.Action("MyAction","MyController"), method = "POST" })`.

## Functionality and Features

| Feature                                                                                                           | Description                                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Items](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/items)                          | The configuration of the Form `Items` allows you to customize their appearance and behavior.                                                                                                                                                        |
| [Layout](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/layout)                        | You can choose between the default and `Grid` layout.                                                                                                                                                                                               |
| [Groups](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/groups)                        | The Form allows you to group the input fields in logical sections.                                                                                                                                                                                  |
| [Buttons](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/buttons)                      | Alter the **Submit** and **Clear** buttons appearance.                                                                                                                                                                                              |
| [Orientation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/orientation)              | You can choose between a `vertical` or `horizontal` orientation of the labels in the Form.                                                                                                                                                          |
| [Responsive Form](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/responsive)           | Configure column spans and breakpoints to make the Form responsive on various screen sizes.                                                                                                                                                         |
| [Validation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/validation)                | The Form has a built-in validator to enable seamless client-side validaiton.                                                                                                                                                                        |
| [Hidden Fields](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/hidden-fields)          | You can hide specific fields, like the `ID`.                                                                                                                                                                                                        |
| [Accessibility](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/accessibility/overview) | The component is accessible for screen readers, supports WAI-ARIA attributes, and delivers [keyboard shortcuts](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/accessibility/keyboard-navigation) for faster navigation. |

## Next Steps

* [Getting Started with the Form](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/layout/form/getting-started-form)
* [Basic Usage of the Form HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/form/index)

## See Also

* [Using the API of the Form for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/form/api)
* [Server-Side API](https://www.telerik.com/aspnet-mvc/documentation/api/form)
