FormItemTagHelper
Kendo UI FormItem TagHelper
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("form-item", ParentTag = "form-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("col-spans", new string[] { "item-label", "form-items", "dropdownlist-editor", "autocomplete-editor", "combobox-editor", "multiselect-editor", "multicolumncombobox-editor", "dropdowntree-editor", "dateinput-editor", "datepicker-editor", "datetimepicker-editor", "timepicker-editor", "numerictextbox-editor", "maskedtextbox-editor", "switch-editor", "rating-editor", "slider-editor", "colorpicker-editor", "flatcolorpicker-editor", "colorgradient-editor", "colorpalette-editor", "richtexteditor-editor", "radiogroup-editor", "checkboxgroup-editor", "textbox-editor", "textarea-editor", "captcha-editor", "grid", "signature-editor", "timedurationpicker-editor", "otpinput-editor", "upload-editor" })]
[SuppressTagRendering]
public class FormItemTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, IFormItem, IEditorContainer
Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseFormItemTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-form name="form">
<form-items>
<form-item field="MyProperty" col-span="2"></form-item>
</form-items>
</kendo-form>
Child Tags
Constructors
Initializes a new instance of the FormItemTagHelper class.
public FormItemTagHelper()
Properties
Defines the field size when grid layout is used. Use this setting to configure the colSpan as a fixed number.
[HtmlAttributeName("col-span")]
public double? ColSpanNumber { get; set; }
Defines the editor widget type. The valid options are as follows: DropDown widgets - "AutoComplete", "DropDownList", "ComboBox", "MultiSelect", "DropDownTree", "MultiColumnComboBox"; DatePicker widgets - "DateInput", "DatePicker", "DateTimePicker", "TimePicker"; Input widgets - "TextBox", "TextArea", "NumericTextBox", "MaskedTextBox", "RadioGroup", "CheckBoxGroup", "Switch", "Rating", "Slider", "ColorPicker", "ColorGradient", "ColorPalette", "FlatColorPicker", "Signature", "OTPInput", "hidden"; Editor widget - "Editor" or Upload widget - "Upload". Important - The casing of the editor must be exactly as shown, combobox is not the same as ComboBox.For any other input, specify the editor as a function that returns the HTML of the element which you wish to render.
public string Editor { get; set; }
Implements:
Defines the editor widget type. The valid options are as follows: DropDown widgets - "AutoComplete", "DropDownList", "ComboBox", "MultiSelect", "DropDownTree", "MultiColumnComboBox"; DatePicker widgets - "DateInput", "DatePicker", "DateTimePicker", "TimePicker"; Input widgets - "TextBox", "TextArea", "NumericTextBox", "MaskedTextBox", "RadioGroup", "CheckBoxGroup", "Switch", "Rating", "Slider", "ColorPicker", "ColorGradient", "ColorPalette", "FlatColorPicker", "Signature", "OTPInput", "hidden"; Editor widget - "Editor" or Upload widget - "Upload". Important - The casing of the editor must be exactly as shown, combobox is not the same as ComboBox.For any other input, specify the editor as a function that returns the HTML of the element which you wish to render.
public string EditorHandler { get; set; }
The editor options for the built-in editor.
[HtmlAttributeNotBound]
public IDictionary<string, object> EditorOptions { get; set; }
Implements:
Defines the id for the EditorTemplate.
public string EditorTemplateId { get; set; }
Defines the HTML content for the EditorTemplate.
public IHtmlContent EditorTemplateView { get; set; }
Maps to the model field which will be configured and sets the name of the input.
public string Field { get; set; }
Implements:
Specifies the hidden state of the Editor.
public bool HiddenEditor { get; set; }
Defines the hint text that will be shown underneath the form editor.
public string Hint { get; set; }
Defines the attributes that are applied to the input element.
public IDictionary<string, object> HtmlAttributes { get; set; }
Configures the label settings for the FormItem.
[HtmlAttributeNotBound]
public IFormItemLabelSettings Label { get; set; }
Implements:
Specify the layout of the item when items.type is set to "group". Valid options: grid: This is equivalent to display: grid. It defines the form item as a grid container and establishes a new grid formatting context for its contents..
public string Layout { get; set; }
Metadata member.
public ModelMetadata Metadata { get; set; }
Implements:
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.