items Array

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

Example

<form id="myForm"></form>

<script>
    $("#myForm").kendoForm({
        formData: {
            ID: 1,
            Name: "Ivan",
            Address: "Sofia"
        },
        items: [{
            field: "Name",
            label: "Name:",
            validation: { required: true }
        }, {
            field: "Address",
            label: "Address:"
        }]
    });
</script>

items.type String

Defines the type of the item. Available options: "group".

items.field String

Maps to the model field which will be configured and sets the name of the input.

items.editor String|Function

Defines the editor widget type. Available options are:

  • DropDown widgets - "AutoComplete", "DropDownList", "ComboBox", "MultiSelect", "DropDownTree", "MultiColumnComboBox"
  • DatePicker widgets - "DateInput", "DatePicker", "DateTimePicker", "TimePicker"
  • Input widgets - "NumericTextBox", "MaskedTextBox", "Switch", "Rating", "Slider", "ColorPicker"
  • Editor widget - "Editor"

items.editorOptions Object

Defines the widget configuration for the specified items.editor.

items.validation Object

Specified the validation rules for the field.

items.label String|Object

Defines the field label.

items.label.text String

Defines the text of the label.

items.label.optional Boolean

Specifies if the field is optional by rendering additional text next to the label.

items.id String

Defines the field id.

items.title String

Defines the field title.

items.hint String

Defines the hint text that will be shown underneath the form editor.

items.colSpan Number

Defines the field size when grid layout is used.

items.attributes Object

Defines the attributes that are applied to the input element.

In this article
Not finding the help you need? Improve this article