New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Form<T>

Class

Kendo UI Form component

Definition

Constructors

Initializes a new instance of the Form class.

C#
public Form(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

Specifies the template which is used for rendering the Form buttons.

C#
public string ButtonsTemplate { get; set; }

The handler for the ButtonsTemplate

C#
public string ButtonsTemplateHandler { get; set; }

The id for the ButtonsTemplate

C#
public string ButtonsTemplateId { get; set; }

Specifies if the clearButton should be rendered on initialization.

C#
public bool? ClearButton { get; set; }

Specifies if the first editor of the form will be focused on initialization.

C#
public bool? FocusFirst { get; set; }

Callback function that could be used to change the default format of the automatically generated labels.

C#
public ClientHandlerDescriptor FormatLabel { get; set; }
C#
public object FormData { get; set; }

Grid layout settings.

C#
public FormGridSettings Grid { get; set; }

A JavaScript array that contains the Form's items configuration.

C#
public List<FormItem> Items { get; set; }

Specify the layout of Form content. Valid options are: grid: This is equivalent to display: grid. It defines the form element as a grid container and establishes a new grid formatting context for its contents..

C#
public string Layout { get; set; }

Configures text messages displayed in the Form. Use it to customize or localize the Form messages.

C#
public FormMessagesSettings Messages { get; set; }

Configures the Form orientation. Available options are "horizontal" and "vertical".By default, the Form is rendered with vertical orientation.

C#
public string Orientation { get; set; }

Sets a value controlling the size of the input.

C#
public ComponentSize? Size { get; set; }

Configures the SmartPasteButton integration for AI-powered form filling. When enabled, adds a SmartPasteButton that can intelligently parse clipboard content and distribute it to appropriate form fields using AI processing.

C#
public SmartPasteButton SmartPaste { get; set; }

Configures the built-in Validator options.

C#
public FormValidatableSettings Validatable { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)