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: apps/documentation/pages/docs/design/components/form.mdx
+19-18Lines changed: 19 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,24 +79,25 @@ This component is used to render a form with the given fields.
79
79
80
80
This property is used to render the fields in the form. Fields can be passed as the array of objects. Each object represents a field. The object can have the following properties.
| key |`true`|`null`|`string`| Unique key for the field. |
85
-
| label |`true`|`null`|`string`| Label for the field. |
86
-
| type |`false`|`text`|`text`, `date`, `number`, `email`, `password`, `tel`, `url`, `search`, `datetime-local`, `time`, `file`, `switch`, `array`, `group`| Type of the field. |
87
-
| children |`false`|`null`|`array`| Children fields for the field if type is array. This allows fields to be added dynamically |
88
-
| fieldOptions.required |`false`|`false`|`boolean`| Whether the field is required or not. |
89
-
| fieldOptions.default |`false`|`null`|`string, boolean`| Value of the field |
90
-
| fieldOptions.multiple |`false`|`false`|`boolean`| Whether fields of type `file` accept multiple values. Only applies to fields of type `file`|
91
-
| fieldOptions.tooltip |`false`|`null`|`string`| Tooltip or help-text that will render a popup when hovered over label of form field. |
92
-
| fieldOptions.accept |`false`|`null`|`string`| A comma separated string that determines the types of files that fields of type `file` will accept. [Example](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept). Only applies to fields of type `file`|
93
-
| fieldOptions.returnIfEmpty |`false`|`false`|`boolean`| Determines if the data from an empty input field will be returned in the form data when empty. |
94
-
| arrayOptions.defaultInstances |`false`|`null`|`number`| Sets a default number of instances for fields of type `array` Only applies to fields of type `array`|
95
-
| arrayOptions.max |`false`|`null`|`number`| Sets a maximum number of instances for fields of type `array` Only applies to fields of type `array`|
96
-
| arrayOptions.min |`false`|`null`|`number`| Sets a minimum number of instances for fields of type `array` Only applies to fields of type `array` arrayOptions.defaultInstances must also be set and must be a number greater than arrayOptions.min |
| fileOptions.protocol |`false`|`native`|`string`| Sets a minimum number of instances for fields of type `array` Only applies to fields of type `array` arrayOptions.defaultInstances must also be set and must be a number greater than arrayOptions.min |
99
-
| fileOptions.tusOptions |`false`|`null`|`Object ({ endpoint: string })`| Determines if a field of type `group` will be collapsible |
| key |`true`|`null`|`string`| Unique key for the field. |
85
+
| label |`true`|`null`|`string`| Label for the field. |
86
+
| type |`false`|`text`|`text`, `date`, `number`, `email`, `password`, `tel`, `url`, `search`, `datetime-local`, `time`, `file`, `switch`, `array`, `group`| Type of the field. |
87
+
| children |`false`|`null`|`array`| Children fields for the field if type is array. This allows fields to be added dynamically |
88
+
| fieldOptions.required |`false`|`false`|`boolean`| Whether the field is required or not. |
89
+
| fieldOptions.readonly |`false`|`false`|`boolean`| Determines is the field will be editable |
90
+
| fieldOptions.default |`false`|`null`|`string, boolean`| Value of the field |
91
+
| fieldOptions.multiple |`false`|`false`|`boolean`| Whether fields of type `file` accept multiple values. Only applies to fields of type `file`|
92
+
| fieldOptions.tooltip |`false`|`null`|`string`| Tooltip or help-text that will render a popup when hovered over label of form field. |
93
+
| fieldOptions.accept |`false`|`null`|`string`| A comma separated string that determines the types of files that fields of type `file` will accept. [Example](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept). Only applies to fields of type `file`|
94
+
| fieldOptions.returnIfEmpty |`false`|`false`|`boolean`| Determines if the data from an empty input field will be returned in the form data when empty. |
95
+
| arrayOptions.defaultInstances |`false`|`null`|`number`| Sets a default number of instances for fields of type `array` Only applies to fields of type `array`|
96
+
| arrayOptions.max |`false`|`null`|`number`| Sets a maximum number of instances for fields of type `array` Only applies to fields of type `array`|
97
+
| arrayOptions.min |`false`|`null`|`number`| Sets a minimum number of instances for fields of type `array` Only applies to fields of type `array` arrayOptions.defaultInstances must also be set and must be a number greater than arrayOptions.min |
| fileOptions.protocol |`false`|`native`|`string`| Sets a minimum number of instances for fields of type `array` Only applies to fields of type `array` arrayOptions.defaultInstances must also be set and must be a number greater than arrayOptions.min |
100
+
| fileOptions.tusOptions |`false`|`null`|`Object ({ endpoint: string })`| Determines if a field of type `group` will be collapsible |
0 commit comments