Form<T>
Kendo UI Form component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class Form<T> : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent, IFormEditor where T : class
Inheritance: objectWidgetBaseForm<T>
Implements:
Inherited Members
Constructors
Initializes a new instance of the Form class.
public Form(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
The view context
initializerIJavaScriptInitializerThe JavaScriptInitializer
urlGeneratorIUrlGeneratorThe URL generator.
Properties
Specifies the template which is used for rendering the Form buttons.
public string ButtonsTemplate { get; set; }
The handler for the ButtonsTemplate
public string ButtonsTemplateHandler { get; set; }
The id for the ButtonsTemplate
public string ButtonsTemplateId { get; set; }
Specifies if the clearButton should be rendered on initialization.
public bool? ClearButton { get; set; }
Specifies if the first editor of the form will be focused on initialization.
public bool? FocusFirst { get; set; }
Callback function that could be used to change the default format of the automatically generated labels.
public ClientHandlerDescriptor FormatLabel { get; set; }
Grid layout settings.
public FormGridSettings Grid { get; set; }
A JavaScript array that contains the Form's items configuration.
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..
public string Layout { get; set; }
Configures text messages displayed in the Form. Use it to customize or localize the Form messages.
public FormMessagesSettings Messages { get; set; }
Configures the Form orientation. Available options are "horizontal" and "vertical".By default, the Form is rendered with vertical orientation.
public string Orientation { get; set; }
Sets a value controlling the size of the input.
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.
public SmartPasteButton SmartPaste { get; set; }
Configures the built-in Validator options.
public FormValidatableSettings Validatable { get; set; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Implements:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
The HtmlTextWriter.
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: