Fields Properties
Editable Props
| Property | Type | Info | Help |
|---|---|---|---|
| type | string | Field type (default: text). |
help |
| value | any | Value of the field. | help |
| initial | any | The initial value of the field. | help |
| default | any | The default value of the field. | help |
| label | string | The Field label. | help |
| placeholder | string | The Field placeholder. | help |
| related | array of strings (field path) |
Execute validation on related fields. | help |
| options | object | Individual Field Options, with fallback on Form Options. | help |
| rules | string | Get DVR Validation Rules. | help |
| validators | array | Get VJF Validation Functions. | help |
| validatedWith | string | Field prop to validate instead value. |
help |
| extra | any | Additional extra data for the field (useful for a select input). | help |
| bindings | string | The key of the registered bindings to use for the current field. | help |
| hooks | object | An object with Event Hooks | help |
| handlers | object | An object with Event Handlers. | help |
| deleted | boolean | The deleted state of the field. (see softDelete option) |
help |
| disabled | boolean | The disabled state of the field. | help |
| autoFocus | boolean | Set this to true for the first input to be focused at form initialization. |
- |
| inputMode | string | The attribute can have any of the following values: none, text, decimal, numeric, tel, search, email, url |
- |
| converter | function | Function to control value computed prop output. |
help |
| converters | function[] | Array of converter functions. | help |
| computed | function | Function returning the value dynamically. Gets { form, field } in input. |
help |
| nullable | boolean | Handle null field value. |
help |
| autoComplete | string | HTML autocomplete attribute value. |
- |
| ref | React Ref | A React Ref will be attached if bind() is used. |
help |
| observers | object | The mobx observers to listen on Fields Props or Fields Map changes. | help |
| interceptors | object | The mobx interceptors to listen on Fields Props or Fields Map changes. | help |
Computed Props
| Property | Type | MobX Type | Info | Help |
|---|---|---|---|---|
| key | string | - | Field key (same of name if not provided) |
- |
| name | string | - | Field name (same of key if not provided). |
- |
| path | string | - | Field path (for nested fields). | help |
| size | int | computed | Number of contained Fields. | - |
| submitting | boolean | computed | Check if the field is in submitting state. | - |
| submitted | int | computed | Check how many times a field has been submitted. | - |
| validating | boolean | computed | Check if the field is in validation state. | - |
| validated | int | computed | Check how many times a field has been validated. | - |
| focused | boolean | computed | Check if the field is focused. | help |
| touched | boolean | computed | Check if the field is touched. | help |
| changed | int | computed | Check how many times the field value has changed. | - |
| blurred | boolean | computed | Check if the field is blurred. | help |
| isValid | boolean | computed | Check if the field is valid. | help |
| isDirty | boolean | computed | Check if the field is dirty. | help |
| isPristine | boolean | computed | Check if the field is pristine. | help |
| isDefault | boolean | computed | Check if the field is to default value. | help |
| isEmpty | boolean | computed | Check if the field is empty. | help |
| hasError | boolean | computed | Check if the field has errors. | help |
| error | string | computed | Field error message. | - |
| files | any | computed | Use the onDrop Event Handler to retrieve the files data. |
help |
| checked | any | computed | The current checked state (when type is "checkbox"). |
- |
| validatedValue | any | computed | Obtain the Field validatedWith prop value. |
- |
| actionRunning | boolean | computed | Check if the field is in the middle of a clear/reset/submit action. | - |
| hasNestedFields | boolean | computed | Check if the field has Nested Fields. | help |
| hasIncrementalKeys | boolean | computed | Check if the nested fields have incremental keys. | - |