You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/layout/form/items.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ position: 2
8
8
9
9
# Items
10
10
11
-
The `Items` configuration options allows you to customize the appearance and behavior of the Form. The `Items` configuration maps the model fields and through it you can:
11
+
The `Items` configuration options allows you to customize the appearance and behavior of the Form. The `Items` configuration maps the model fields and through it you can:
12
12
13
13
* customize the editors
14
14
* customize the labels and hints of the editors
@@ -39,7 +39,7 @@ The following example shows how to set the `Label` of an item. Enabling the `Opt
39
39
40
40
## Configure Hint
41
41
42
-
The following example shows how to set the `Hint` of an item. The hint is displayed below the editor of the field.
42
+
The following example shows how to set the `Hint` of an item. The hint is displayed below the editor of the field.
@@ -63,7 +63,7 @@ The following example shows how to set the `Hint` of an item. The hint is displa
63
63
64
64
## Configure Editor
65
65
66
-
With the `Editor` option you can explicitly configure an editor to be used for a specific field. See the [editor](https://docs.telerik.com/kendo-ui/api/javascript/ui/form/configuration/items#itemseditor) configuration option in the client-side API documentation, for a list of the supported editors.
66
+
With the `Editor` option you can explicitly configure an editor to be used for a specific field. See the [editor](https://docs.telerik.com/kendo-ui/api/javascript/ui/form/configuration/items#itemseditor) configuration option in the client-side API documentation, for a list of the supported editors.
Copy file name to clipboardExpand all lines: docs/controls/layout/form/items.md
+53-26Lines changed: 53 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ position: 2
8
8
9
9
# Items
10
10
11
-
The `items` configuration options allows you to customize the appearance and behavior of the Form. If it is not set, the Form will render default editors based on the data provided in its `formData` configuration.
11
+
The `items` configuration options allows you to customize the appearance and behavior of the Form. If it is not set, the Form will render default editors based on the data provided in its `formData` configuration.
12
12
13
13
The following example shows the Form initialized with the `items` option not set.
14
14
15
15
```dojo
16
16
<form id="form"></form>
17
-
17
+
18
18
<script>
19
19
$(document).ready(function () {
20
20
$("#form").kendoForm({
@@ -30,7 +30,7 @@ The following example shows the Form initialized with the `items` option not set
30
30
</script>
31
31
```
32
32
33
-
Setting the `items` configuration maps the model fields and allows you to:
33
+
Setting the `items` configuration maps the model fields and allows you to:
34
34
35
35
* customize the editors
36
36
* customize the labels and hints of the editors
@@ -53,15 +53,15 @@ The following example shows how to set the `label` of an item. Enabling the `opt
53
53
Birth: new Date()
54
54
},
55
55
items: [
56
-
{
57
-
field: "FirstName",
58
-
label: "First Name:",
59
-
validation: { required: true }
56
+
{
57
+
field: "FirstName",
58
+
label: "First Name:",
59
+
validation: { required: true }
60
60
},
61
-
{
62
-
field: "LastName",
63
-
label: "Last Name:",
64
-
validation: { required: true }
61
+
{
62
+
field: "LastName",
63
+
label: "Last Name:",
64
+
validation: { required: true }
65
65
},
66
66
{
67
67
field: "Birth",
@@ -75,7 +75,7 @@ The following example shows how to set the `label` of an item. Enabling the `opt
75
75
76
76
## Configure Hint
77
77
78
-
The following example shows how to set the `hint` of an item. The hint is displayed below the editor of the field.
78
+
The following example shows how to set the `hint` of an item. The hint is displayed below the editor of the field.
79
79
80
80
```dojo
81
81
<form id="form"></form>
@@ -90,21 +90,21 @@ The following example shows how to set the `hint` of an item. The hint is displa
90
90
Birth: new Date()
91
91
},
92
92
items: [
93
-
{
94
-
field: "FirstName",
95
-
label: "First Name:",
96
-
validation: { required: true }
93
+
{
94
+
field: "FirstName",
95
+
label: "First Name:",
96
+
validation: { required: true }
97
97
},
98
-
{
99
-
field: "LastName",
100
-
label: "Last Name:",
101
-
validation: { required: true }
98
+
{
99
+
field: "LastName",
100
+
label: "Last Name:",
101
+
validation: { required: true }
102
102
},
103
-
{
104
-
field: "Password",
105
-
label: "Password:",
106
-
validation: { required: true },
107
-
hint: "Hint: enter alphanumeric characters only."
103
+
{
104
+
field: "Password",
105
+
label: "Password:",
106
+
validation: { required: true },
107
+
hint: "Hint: enter alphanumeric characters only."
108
108
}
109
109
]
110
110
});
@@ -114,7 +114,7 @@ The following example shows how to set the `hint` of an item. The hint is displa
114
114
115
115
## Configure Editor
116
116
117
-
With the `editor` option you can explicitly configure an editor to be used for a specific field. See the [editor](https://docs.telerik.com/kendo-ui/api/javascript/ui/form/configuration/items#itemseditor) configuration option in the client-side API documentation, for a list of the supported editors.
117
+
With the `editor` option you can explicitly configure an editor to be used for a specific field. See the [editor](https://docs.telerik.com/kendo-ui/api/javascript/ui/form/configuration/items#itemseditor) configuration option in the client-side API documentation, for a list of the supported editors.
118
118
119
119
```dojo
120
120
<form id="form"></form>
@@ -188,6 +188,33 @@ With the `editor` option you can explicitly configure an editor to be used for a
188
188
</script>
189
189
```
190
190
191
+
## Custom Editor
192
+
193
+
You can implement custom editor by using the editor option as a function as follows:
0 commit comments